Closed andreineculau closed 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".
to set the exit code in case path is incorrect