Add notice to the rustup installer of environment variables in order to change install directory
Problem you are trying to solve
User wants to install rust to a different drive (on e.g. Windows) or user/software path (Linux/Mac). There is no explicit mention of this when installing. Had to resort to internet search to find solution to the issue (default documentation should not be closed bugs and reddit threads).
Solution you'd like
Either an interactive option or a message to set (bonus points for setting environment variables from rustup) the CARGO_HOME/RUST_HOME variables in order to change the install directory.
Notes
No response
The current (master) rustup-init message looks like this:
Welcome to Rust!
This will download and install the official compiler for the Rust
programming language, and its package manager, Cargo.
Rustup metadata and toolchains will be installed into the Rustup
home directory, located at:
/Users/djc/.rustup
This can be modified with the RUSTUP_HOME environment variable.
The Cargo home directory is located at:
/Users/djc/.cargo
This can be modified with the CARGO_HOME environment variable.
The cargo, rustc, rustup and other commands will be added to
Cargo's bin directory, located at:
/Users/djc/.cargo/bin
This path will then be added to your PATH environment variable by
modifying the profile files located at:
/Users/djc/.profile
/Users/djc/.zshenv
You can uninstall at any time with rustup self uninstall and
these changes will be reverted.
Current installation options:
default host triple: aarch64-apple-darwin
default toolchain: stable (default)
profile: default
modify PATH variable: yes
1) Proceed with installation (default)
2) Customize installation
3) Cancel installation
In particular, it mentions RUSTUP_HOME and CARGO_HOME. Is that good enough or do you need more?
Wow I'm blind (I'm having a headache today, so maybe that's why I didn't see that).
I think you could call it out better with a call to attention, e.g.:
******************************************************************
!!! To Change the install location set the CARGO_HOME !!!
!!! and RUSTUP_HOME environment variables as shown below !!!
******************************************************************
I've seen terminals employ emphasis and color to get across the message.
Your current message is extremely verbose and I think I may not be the only flu-ridden fool to miss the information.
I've also see e.g. the following type of summary used to great effect:
Install summary:
=============================
CARGO_HOME=C:\Users\user\.cargo
RUSTUP_HOME=C:\Users\user\.rustup
CARGO_BIN=%CARGO_HOME%\bin => C:\Users\user\.cargo\bin
RUSTUP_BIN=%RUSTUP_HOME%\bin => C:\Users\user\.rustup\bin
PATH=C:\Users\user\.profile;%PATH%
=============================
That took 7 lines and, with some spacing/emphasis, is far clearer than the ~35 line wall of text you have now.
I agree that the current version is pretty verbose and that we should probably tighten it up a bit.
Wow I'm blind (I'm having a headache today, so maybe that's why I didn't see that).
I think you could call it out better with a call to attention, e.g.:
******************************************************************!!! To Change the install location set the CARGO_HOME !!! !!! and RUSTUP_HOME environment variables as shown below !!!******************************************************************I've seen terminals employ emphasis and color to get across the message.
Your current message is extremely verbose and I think I may not be the only flu-ridden fool to miss the information.
I've also see e.g. the following type of summary used to great effect:
Install summary:
=============================CARGO_HOME=C:\Users\user\.cargoRUSTUP_HOME=C:\Users\user\.rustupCARGO_BIN=%CARGO_HOME%\bin => C:\Users\user\.cargo\binRUSTUP_BIN=%RUSTUP_HOME%\bin => C:\Users\user\.rustup\binPATH=C:\Users\user\.profile;%PATH%=============================That took 7 lines and, with some spacing/emphasis, is far clearer than the ~35 line wall of text you have now.
I missed it too and agree. The new Windows "Dev Home" moved my package cache and messed up my rustup install location.
Just to clarify, are you saying you should set the env vars before or after (I can just mv the dir + change the path) the install? Or it doesn't matter when?