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

Display the cargo and rustup home paths #1914

Merged
merged 1 commit into from
Jul 1, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions src/cli/self_update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,15 @@ Cargo's bin directory, located at:

{cargo_home_bin}

This can be modified with the CARGO_HOME environment variable.

Rustup metadata and toolchains will be installed into the Rustup
home directory, located at:

{rustup_home}

This can be modified with the RUSTUP_HOME environment variable.

",
$platform_msg,
r#"
Expand Down Expand Up @@ -538,6 +547,7 @@ fn do_msvc_check(_opts: &InstallOpts) -> Result<bool> {
fn pre_install_msg(no_modify_path: bool) -> Result<String> {
let cargo_home = utils::cargo_home()?;
let cargo_home_bin = cargo_home.join("bin");
let rustup_home = utils::rustup_home()?;

if !no_modify_path {
if cfg!(unix) {
Expand All @@ -562,18 +572,21 @@ fn pre_install_msg(no_modify_path: bool) -> Result<String> {
pre_install_msg_unix!(),
cargo_home_bin = cargo_home_bin.display(),
plural = plural,
rcfiles = rcfiles
rcfiles = rcfiles,
rustup_home = rustup_home.display(),
))
} else {
Ok(format!(
pre_install_msg_win!(),
cargo_home_bin = cargo_home_bin.display()
cargo_home_bin = cargo_home_bin.display(),
rustup_home = rustup_home.display(),
))
}
} else {
Ok(format!(
pre_install_msg_no_modify_path!(),
cargo_home_bin = cargo_home_bin.display()
cargo_home_bin = cargo_home_bin.display(),
rustup_home = rustup_home.display(),
))
}
}
Expand Down