Skip to content

rustup update self should suggest rustup self update #3812

Closed

Description

@ChrisDenton

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.

### Tasks
- [ ] https://github.com/rust-lang/rustup/issues/3905

Activity

  1. added this to the 1.28.0 milestone on May 7, 2024
  2. rami3l commented on May 7, 2024

    @rami3l
    Member

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

  3. fbrv commented on May 7, 2024

    @fbrv

    I'd like to give a shot

  4. rami3l commented on May 7, 2024

    @rami3l
    Member

    I'd like to give a shot

    @fbrv Please, go ahead!

  5. fbrv commented on May 8, 2024

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

  6. rami3l commented on May 8, 2024

    @rami3l
    Member

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

  7. rami3l commented on Jun 24, 2024

    @rami3l
    Member

    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!

  8. Xerxes-2 commented on Jun 24, 2024

    @Xerxes-2
    Contributor

    Could I try this?

  9. rami3l commented on Jun 24, 2024

    @rami3l
    Member

    Could I try this?

    @Xerxes-2 Yes, please!

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions