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 does not tell users where the toolchains will be installed #1907

Closed
gnzlbg opened this issue Jun 21, 2019 · 3 comments · Fixed by #1914
Closed

Rustup does not tell users where the toolchains will be installed #1907

gnzlbg opened this issue Jun 21, 2019 · 3 comments · Fixed by #1914

Comments

@gnzlbg
Copy link
Contributor

gnzlbg commented Jun 21, 2019

Problem

When using the installer to install rustup, it is installed to RUSTUP_HOME.

Last time I tried the installer it did not mention anything about this. That is, a user executes the script, the toolchain gets installed, then the user needs to figure out where things got installed, decide whether those directories are ok, and if not, then google whether that can be changed, and then, uninstall the toolchain, and then set RUSTUP_HOME to an appropriate location and reinstall Rust again.

Steps

  1. Execute rustup installation script and press Y for everything. Nothing about where things are installed is mentioned, much less a way to change that is offered.

Possible Solution(s)

It's an installer. It should tell you where it is going to install the thing, ask you if its ok, and let you change it if it isn't.

Something like:

The Rust toolchain will be installed to ${RUSTUP_HOME}. Is this location ok?

User input: Y/n

[on n]: Please set the RUSTUP_HOME environment variable to an appropriate location before running the installer (process exit with error).

would probably be enough to fix this bug, but allowing the user to choose an appropriate path would be nice and give a much better impression IMO.

At which path should the Rust toolchain be installed?

User input:

Installing things to an non-disclosed directory and not even suggesting where to change it always gave me a pretty bad impression. Sure, I was able to search for it online, but I don't think users should be required to do that for something as basic as setting an installation path in an installer.


This issue was raised as part of #618 , people have been running into this for years. That issue was closed because it is technically possible to change the installation path by setting the RUSTUP_HOME environment variable already. This issue is not about enabling a way to do that, but just about implementing basic installer functionality so that people don't have to do uninstall/reinstall dances or reading the whole README to figure out how to do the most fundamental thing an installer does (installing something somewhere).

@rbtcollins
Copy link
Contributor

This should be quite straight forward, and I'm happy to mentor an interested person.

@skilly-lily
Copy link

I'd like to work on this one. I could use some help figuring out the codebase, though.

@skilly-lily
Copy link

Nvm, figured it out. The current behavior of CARGO_HOME is to display the path, but not allow the user to change it as part of the install process. Instead, the user must cancel the installation, set the environment variable, and then restart the installer. So I copied that functionality for RUSTUP_HOME instead, and pointed the installer text to the CARGO_HOME and RUSTUP_HOME variables.

If there is a real desire to move CARGO_HOME or RUSTUP_HOME functionality to the interactive installer, then that would be a bit of a larger change, since those variables may need to be added permanently to the OS. Currently, seems like we assume that if they're set during install, they'll be set during execution.

Submitting PR soon, could discuss this further, if need be.

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

Successfully merging a pull request may close this issue.

3 participants