Skip to content

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

@davidbuzz

Description

@davidbuzz

Problem you are trying to solve

have an app that I'm building that gives instructions to "install rust", and links to the rustup site.
I ran this as instructed:

curl https://sh.rustup.rs -sSf | sh
info: downloading installer
warning: it looks like you have an existing installation of Rust at:
warning: /usr/bin
warning: It is recommended that rustup be the primary Rust installation.
warning: Otherwise you may have confusion unless you are careful with your PATH
warning: If you are sure that you want both rustup and your already installed Rust
warning: then please reply `y' or `yes' or set RUSTUP_INIT_SKIP_PATH_CHECK to yes
warning: or pass `-y' to ignore all ignorable checks.
error: cannot install while Rust is installed

rustup's idea of what rust is, not installed, because of "some other" rust and no idea how to fix that above error.

Solution you'd like

I wanted it to install rust using rustup

after 10 minutes of googling this came up:
https://www.reddit.com/r/rust/comments/se7ecj/how_to_uninstall_rust_without_rustup/
rust-lang/rls#1399
#953

.. so its not just me..

solution:
emit this message instead:
"Would you like to uninstall the system-provided/older rust and use a newer one?" run 'sudo apt remove rustc' or similar for your platform

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions