Skip to content

feat(cli/self-update): refine wording of "already installed Rust" warning#4851

Merged
rami3l merged 1 commit intorust-lang:mainfrom
rami3l:feat/mention-already-installed-rust
May 8, 2026
Merged

feat(cli/self-update): refine wording of "already installed Rust" warning#4851
rami3l merged 1 commit intorust-lang:mainfrom
rami3l:feat/mention-already-installed-rust

Conversation

@rami3l
Copy link
Copy Markdown
Member

@rami3l rami3l commented May 8, 2026

Closes #3679 by mentioning https://rust-lang.github.io/rustup/installation/already-installed-rust.html in the rustup-init installer's output.

As discussed in #3679 (comment), if a rustup packager chooses to skip the installer completely, it is the responsibility of the packager to issue this warning in the package manager instead.

@mobiuscog
Copy link
Copy Markdown

Would this cause confusion if:

  1. Rustup is installed elsewhere (system) but not in the user override
  2. Rustup is installed in the user override already
    Or would the code checks prevent this text being shown in the case of (2) ?

I like the change though (as a non-reviewer).

@rami3l
Copy link
Copy Markdown
Member Author

rami3l commented May 8, 2026

Would this cause confusion if:

  1. Rustup is installed elsewhere (system) but not in the user override
  2. Rustup is installed in the user override already
    Or would the code checks prevent this text being shown in the case of (2) ?

@mobiuscog My apologies but I am not sure if I have fully comprehended the said confusion.

Rustup is designed as a per-user application, but the way it's packaged in say Debian, as long as the package is installed by the sysadmin, rustc and cargo will be present in your PATH immediately; it's the toolchain installation that will happen locally in your user account.

Whether that is the case or you have previously installed rustup from https://rustup.rs doesn't matter; in both cases there's no need to run the installer again 👀

Maybe I have misunderstood something here?

@mobiuscog
Copy link
Copy Markdown

Apologies @rami3l - perhaps it's my confusion around what happens if rustup is already installed at a system level and I install a toolchain - I would have expected it to be at a system level as well (and therefore collide) but if the system rustup is per-user and would simply add to a local user toolchain install (and not affect the system install) then that's likely fine.

I have only ever installed it as a user, never as root. I have just noticed that rustup and rust are often different packages in a repository, and so there could be confusion around what happens if a user installs rustup via the shell, and then a later system update installs it as a system package. Perhaps I'm overthinking things here and just don't understand the difference between rustup as a distro package and rustup via the website/script, if at all there is one.

Comment thread src/cli/self_update.rs Outdated
@rami3l rami3l force-pushed the feat/mention-already-installed-rust branch from 03d41fd to d3023c0 Compare May 8, 2026 16:00
@rami3l rami3l force-pushed the feat/mention-already-installed-rust branch from d3023c0 to 52430d4 Compare May 8, 2026 16:02
@rami3l
Copy link
Copy Markdown
Member Author

rami3l commented May 8, 2026

I have only ever installed it as a user, never as root. I have just noticed that rustup and rust are often different packages in a repository, and so there could be confusion around what happens if a user installs rustup via the shell, and then a later system update installs it as a system package. Perhaps I'm overthinking things here and just don't understand the difference between rustup as a distro package and rustup via the website/script, if at all there is one.

@mobiuscog No worries, thanks again for your feedback and your prudence!

@rami3l rami3l enabled auto-merge May 8, 2026 16:08
@rami3l rami3l added this pull request to the merge queue May 8, 2026
Merged via the queue into rust-lang:main with commit e81f2fa May 8, 2026
29 checks passed
@rami3l rami3l deleted the feat/mention-already-installed-rust branch May 8, 2026 16:55
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.

when rustup finds an existing rust install it doesn't give the user any hints about what to do next

3 participants