Skip to content

Route CLI parsing errors through clap (#20 §4, §5) - #24

Merged
guyte149 merged 2 commits into
masterfrom
fix/issue-20-cli-error-handling
Apr 29, 2026
Merged

Route CLI parsing errors through clap (#20 §4, §5)#24
guyte149 merged 2 commits into
masterfrom
fix/issue-20-cli-error-handling

Conversation

@guyte149

Copy link
Copy Markdown
Owner

Previously, an unresolvable server address panicked and an invalid remote spec was reported via eprintln! + process::exit(1). Both paths bypassed clap's error formatting and exit codes.

Move both into clap value_parsers (parse_server_addr, parse_remote) so failures surface as clap::Error with the standard formatting and exit code 2, matching every other CLI parsing failure. The rustls crypto-provider install failure now also flows through clap instead of .expect().

Made-with: Cursor

Previously, an unresolvable server address panicked and an invalid
remote spec was reported via eprintln! + process::exit(1). Both paths
bypassed clap's error formatting and exit codes.

Move both into clap value_parsers (parse_server_addr, parse_remote)
so failures surface as clap::Error with the standard formatting and
exit code 2, matching every other CLI parsing failure. The rustls
crypto-provider install failure now also flows through clap instead
of .expect().

Made-with: Cursor
Made-with: Cursor
@guyte149
guyte149 merged commit 7c44f27 into master Apr 29, 2026
1 check passed
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