Skip to content

fix(cli): return usage errors with exit code 2 - #24

Merged
JohnXu22786 merged 1 commit into
mainfrom
bug/cli-usage-error-exit-code
Sep 12, 2026
Merged

JohnXu22786 merged 1 commit into
mainfrom
bug/cli-usage-error-exit-code

Conversation

@JohnXu22786

Copy link
Copy Markdown
Owner

What this PR does

Before this PR:

Unknown flags and missing option values were treated as runtime failures and exited with code 1.

After this PR:

CLI parser failures return the documented usage-error code 2, with regression coverage for unknown flags and missing option values.

Type of change

Bug fix

Breaking changes (if any)

None.

Classify parser failures separately from runtime failures so unknown flags and missing option values use the documented usage-error exit code.
@JohnXu22786
JohnXu22786 marked this pull request as ready for review September 12, 2026 11:08
@JohnXu22786
JohnXu22786 merged commit ae804fe into main Sep 12, 2026
2 checks passed
@JohnXu22786
JohnXu22786 deleted the bug/cli-usage-error-exit-code branch September 12, 2026 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant