Skip to content

fix(rustup-mode): improve clap error format#3906

Merged
rami3l merged 1 commit intorust-lang:masterfrom
rami3l:fix/clap-error-format
Jun 25, 2024
Merged

fix(rustup-mode): improve clap error format#3906
rami3l merged 1 commit intorust-lang:masterfrom
rami3l:fix/clap-error-format

Conversation

@rami3l
Copy link
Copy Markdown
Member

@rami3l rami3l commented Jun 25, 2024

Closes #3905 by preventing clap errors from surfacing upwards in rustup_mode::main.

Before

> rustup update self
error: error: invalid value 'self' for '[toolchain]...': invalid toolchain name: 'self'

For more information, try '--help'.
: invalid toolchain name: 'self'

After

> RUSTUP_FORCE_ARG0=rustup rustup run stable cargo run -- update self
[..]
error: invalid value 'self' for '[TOOLCHAIN]...': invalid toolchain name: 'self'

For more information, try '--help'.

@rami3l rami3l requested a review from djc June 25, 2024 06:05
@rami3l rami3l marked this pull request as ready for review June 25, 2024 06:06
@rami3l rami3l added this pull request to the merge queue Jun 25, 2024
Merged via the queue into rust-lang:master with commit 35285c9 Jun 25, 2024
@rami3l rami3l deleted the fix/clap-error-format branch June 25, 2024 07:49
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.

Improve handling of clap errors

2 participants