mudler / yip

:pushpin: Yaml Instructions Processor - Simply applies a cloud-init style yaml file to the system

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Errors in `if` expressions go undetected

kkaempf opened this issue · comments

Well, turns out that #44 isn't really an improvement since false if-expressions are reported as failures.

So you can't distinguish between "if expression evaluates to false" and "if expression is syntactically wrong" in the logs.

The actual problem is in console.Run which reports a non-zero exit code as error and combines stdout+stderr.

Maybe console.Run should check for non-empty stderr instead ? 🤔
Or a separate console.If is needed ? 🤷🏻‍♂️