Skip to content

Commit

Permalink
patch: fix exit status
Browse files Browse the repository at this point in the history
`exit` has higher precedence than `?:`, so `exit $patch->error ? 1 : 0` parses as `(exit $patch->error)  ? 1 : 0`, which is not what was intended.
  • Loading branch information
mauke authored Nov 23, 2023
1 parent a3e3995 commit 2b496ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/patch
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ if (ref $patch eq 'Patch') {
}

$patch->note("done\n");
exit $patch->error ? 1 : 0;
exit($patch->error ? 1 : 0);

END {
close STDOUT || die "$0: can't close stdout: $!\n";
Expand Down

0 comments on commit 2b496ed

Please sign in to comment.