ysoftwareab / yplatform

Self-service bootstrap/build/CI/CD. Software and configuration that supports various cycles of software development.
Apache License 2.0
19 stars 7 forks source link

jq invocations need -e #240

Closed andreineculau closed 2 years ago

andreineculau commented 3 years ago

to set the exit code in case path is incorrect

andreineculau commented 2 years ago

from jq's manual:

Sets the exit status of jq to 0 if the last output values was neither false nor null, 1 if the last output value was either false or null, or 4 if no valid result was ever produced. Normally jq exits with 2 if there was any usage problem or system error, 3 if there was a jq program compile error, or 0 if the jq program ran.

This makes it more complicated when all we need is "if path doesn't exist, exit 1".