Skip to content

Commit

Permalink
exit immediately after halt or halt_error is called
Browse files Browse the repository at this point in the history
Instead of continuing to the next input, and only exiting if there are
no more inputs.
  • Loading branch information
emanuele6 committed Jul 7, 2023
1 parent 0eceded commit 31a769e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,8 @@ int main(int argc, char* argv[]) {
ret = process(jq, value, jq_flags, dumpopts);
if (ret <= 0 && ret != JQ_OK_NO_OUTPUT)
last_result = (ret != JQ_OK_NULL_KIND);
if (jq_halted(jq))
break;
continue;
}

Expand Down

0 comments on commit 31a769e

Please sign in to comment.