Skip to content

Commit

Permalink
Exit 2 instead of 1 when the tool's arguments are used incorrectly
Browse files Browse the repository at this point in the history
  • Loading branch information
abstractlyZach committed Oct 24, 2022
1 parent 9ead3ad commit 06b2d36
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ static int main(PrintWriter out, PrintWriter err, String... args) {
return formatter.format(args);
} catch (UsageException e) {
err.print(e.getMessage());
return 1;
// We return exit code 2 to differentiate usage issues from code formatting issues.
return 2;
} finally {
err.flush();
out.flush();
Expand Down

0 comments on commit 06b2d36

Please sign in to comment.