Skip to content

Commit 14128aa

Browse files
committed
Improved warning/error message for check_existence_of_rustc_or_cargo_in_path.
1 parent ac5105f commit 14128aa

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/cli/self_update.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -391,12 +391,13 @@ fn check_existence_of_rustc_or_cargo_in_path(no_prompt: bool) -> Result<()> {
391391
}
392392

393393
if let Err(path) = rustc_or_cargo_exists_in_path() {
394-
err!("it looks like you have an existing installation of Rust at:");
395-
err!("{}", path);
396-
err!("rustup should not be installed alongside Rust. Please uninstall your existing Rust first.");
397-
err!("Otherwise you may have confusion unless you are careful with your PATH");
398-
err!("If you are sure that you want both rustup and your already installed Rust");
399-
err!("then please restart the installation and pass `-y' to bypass this check.");
394+
warn!("it looks like you have an existing installation of Rust at:");
395+
warn!("{}", path);
396+
warn!("rustup should not be installed alongside Rust. Please uninstall your existing Rust first.");
397+
warn!("Otherwise you may have confusion unless you are careful with your PATH");
398+
warn!("If you are sure that you want both rustup and your already installed Rust");
399+
warn!("then please reply `y' or `yes' or set RUSTUP_INIT_SKIP_PATH_CHECK to yes");
400+
warn!("or pass `-y' to ignore all ignorable checks.");
400401
ignorable_error("cannot install while Rust is installed".into(), no_prompt)?;
401402
}
402403
Ok(())

0 commit comments

Comments
 (0)