-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Description
jq -e
always exits with status 0 when passed empty input. For example:
$ echo | jq --exit-status 'false'; echo $?
0
Consider a use case like this one:
call-some-json-api |
jq --exit-status '.field == "some-value"' &&
take-action
If the API call fails and output is only written to stderr, take-action
will still run as though the call succeeded, and "some-value" had been set.
This may be related to issue #667, but that one has been fixed on master, and this bug is still present.
TylerRick, mhr3, scottleibrand, petvaa01, deiwin and 6 moreTylerRick
Metadata
Metadata
Assignees
Labels
No labels