pipeline: analysis: ignore CUE errors
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
parent
d01940b9a1
commit
e37f8c5e53
@ -119,8 +119,7 @@ func (e *Environment) LocalDirs() (map[string]string, error) {
|
|||||||
newTaskFunc(noOpRunner),
|
newTaskFunc(noOpRunner),
|
||||||
)
|
)
|
||||||
for _, t := range flow.Tasks() {
|
for _, t := range flow.Tasks() {
|
||||||
v := compiler.Wrap(t.Value())
|
if err := localdirs(compiler.Wrap(t.Value())); err != nil {
|
||||||
if err := localdirs(v.Lookup("#up")); err != nil {
|
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -121,7 +121,9 @@ func ops(code *compiler.Value) ([]*compiler.Value, error) {
|
|||||||
func Analyze(fn func(*compiler.Value) error, code *compiler.Value) error {
|
func Analyze(fn func(*compiler.Value) error, code *compiler.Value) error {
|
||||||
ops, err := ops(code)
|
ops, err := ops(code)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
// Ignore CUE errors when analyzing. This might be because the value is
|
||||||
|
// not concrete since static analysis runs before pipelines are executed.
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
for _, op := range ops {
|
for _, op := range ops {
|
||||||
if err := analyzeOp(fn, op); err != nil {
|
if err := analyzeOp(fn, op); err != nil {
|
||||||
|
Reference in New Issue
Block a user