Skip to content

Commit

Permalink
Merge pull request #2155 from kinnison/improve-preinstalled-rust-message
Browse files Browse the repository at this point in the history
Improve preinstalled rust message
  • Loading branch information
kinnison authored Dec 16, 2019
2 parents 47ddb31 + b9e36fb commit 00cff91
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/cli/self_update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,10 @@ fn check_existence_of_rustc_or_cargo_in_path(no_prompt: bool) -> Result<()> {
if let Err(path) = rustc_or_cargo_exists_in_path() {
err!("it looks like you have an existing installation of Rust at:");
err!("{}", path);
err!("rustup cannot be installed alongside Rust. Please uninstall first");
err!("if this is what you want, restart the installation with `-y'");
err!("rustup should not be installed alongside Rust. Please uninstall your existing Rust first.");
err!("Otherwise you may have confusion unless you are careful with your PATH");
err!("If you are sure that you want both rustup and your already installed Rust");
err!("then please restart the installation and pass `-y' to bypass this check.");
Err("cannot install while Rust is installed".into())
} else {
Ok(())
Expand Down
4 changes: 2 additions & 2 deletions tests/cli-misc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ fn install_stops_if_rustc_exists() {
.contains("it looks like you have an existing installation of Rust at:"));
assert!(out
.stderr
.contains("if this is what you want, restart the installation with `-y'"));
.contains("restart the installation and pass `-y'"));
});
}

Expand Down Expand Up @@ -651,7 +651,7 @@ fn install_stops_if_cargo_exists() {
.contains("it looks like you have an existing installation of Rust at:"));
assert!(out
.stderr
.contains("if this is what you want, restart the installation with `-y'"));
.contains("restart the installation and pass `-y'"));
});
}

Expand Down

0 comments on commit 00cff91

Please sign in to comment.