diff --git a/src/rustup-cli/job.rs b/src/rustup-cli/job.rs index 0c2f85d422..fb11936493 100644 --- a/src/rustup-cli/job.rs +++ b/src/rustup-cli/job.rs @@ -156,7 +156,6 @@ mod imp { let mut killed = false; let list = &jobs.list[..jobs.header.NumberOfProcessIdsInList as usize]; assert!(list.len() > 0); - info!("found {} remaining processes", list.len() - 1); let list = list.iter().filter(|&&id| { // let's not kill ourselves diff --git a/src/rustup/toolchain.rs b/src/rustup/toolchain.rs index 51f25ba4a1..dc29c32961 100644 --- a/src/rustup/toolchain.rs +++ b/src/rustup/toolchain.rs @@ -331,7 +331,7 @@ impl<'a> Toolchain<'a> { return Err(ErrorKind::ToolchainNotInstalled(self.name.to_owned()).into()); } if !primary_toolchain.exists() { - return Err(ErrorKind::ToolchainNotInstalled(self.name.to_owned()).into()); + return Err(ErrorKind::ToolchainNotInstalled(primary_toolchain.name.to_owned()).into()); } let src_file = self.path.join("bin").join(format!("cargo{}", EXE_SUFFIX)); diff --git a/tests/cli-exact.rs b/tests/cli-exact.rs index b384db59e7..7e9e254345 100644 --- a/tests/cli-exact.rs +++ b/tests/cli-exact.rs @@ -315,3 +315,14 @@ fn disable_telemetry() { "info: telemetry set to 'off'\n"); }); } + +// issue #927 +#[test] +fn undefined_linked_toolchain() { + setup(&|config| { + expect_err_ex(config, + &["cargo", "+bogus", "test"], + r"", + &format!("error: toolchain 'bogus' is not installed\n")); + }); +}