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

Use correct name for undefined linked toolchain invocation #1008

Merged
merged 1 commit into from
Mar 31, 2017
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion src/rustup-cli/job.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/rustup/toolchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
11 changes: 11 additions & 0 deletions tests/cli-exact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,3 +315,14 @@ fn disable_telemetry() {
&format!("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"));
});
}