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.

Closes jqlang#2533
  • Loading branch information
emanuele6 authored and itchyny committed Jul 8, 2023
1 parent d0914ff commit a72cffe
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 a72cffe

Please sign in to comment.