rustup icon indicating copy to clipboard operation
rustup copied to clipboard

`rustup update self` should suggest `rustup self update`

Open ChrisDenton opened this issue 1 year ago • 5 comments

Problem you are trying to solve

A new-ish user got confused about the command for updating rustup itself and tried rustup update self which gave this error:

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

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

Solution you'd like

Maybe something like:

note: use `rustup self update` to update rustup itself

Notes

I'm also not sure why the : invalid toolchain name: 'self' is repeated at the end. That seems redundant.

ChrisDenton avatar May 07 '24 11:05 ChrisDenton

@ChrisDenton Thanks a lot! Should be an easy fix.

rami3l avatar May 07 '24 11:05 rami3l

I'd like to give a shot

fbrv avatar May 07 '24 11:05 fbrv

I'd like to give a shot

@fbrv Please, go ahead!

rami3l avatar May 07 '24 11:05 rami3l

@rami3l, @djc I have something but before opening the PR I'm wondering how we want to show the message. Should we append, prepend or replace the message with the note?

fbrv avatar May 08 '24 13:05 fbrv

@rami3l, @djc I have something but before opening the PR I'm wondering how we want to show the message. Should we append, prepend or replace the message with the note?

@fbrv Following the example of rustc error messages, it seems to me that any "smart guess" lines should come after the original error message.

Please note that there could be a toolchain named self, so it's important to show the line on error exclusively.

rami3l avatar May 08 '24 14:05 rami3l

Unfortunately, @fbrv just DM'd me and expressed their wish of backing out due to a personal incident. Thanks anyway for having offered to help!

rami3l avatar Jun 24 '24 11:06 rami3l

Could I try this?

Xerxes-2 avatar Jun 24 '24 11:06 Xerxes-2

Could I try this?

@Xerxes-2 Yes, please!

rami3l avatar Jun 24 '24 11:06 rami3l