Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustup update self should suggest rustup self update #3812

Open
ChrisDenton opened this issue May 7, 2024 · 5 comments
Open

rustup update self should suggest rustup self update #3812

ChrisDenton opened this issue May 7, 2024 · 5 comments

Comments

@ChrisDenton
Copy link
Contributor

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.

@rami3l rami3l added this to the 1.28.0 milestone May 7, 2024
@rami3l
Copy link
Member

rami3l commented May 7, 2024

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

@rami3l rami3l added the E-easy label May 7, 2024
@fbrv
Copy link

fbrv commented May 7, 2024

I'd like to give a shot

@rami3l
Copy link
Member

rami3l commented May 7, 2024

I'd like to give a shot

@fbrv Please, go ahead!

@djc djc assigned fbrv May 7, 2024
@fbrv
Copy link

fbrv commented May 8, 2024

@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?

@rami3l
Copy link
Member

rami3l commented May 8, 2024

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants