Skip to content

Commit

Permalink
Merge pull request #1008 from topecongiro/undefined-linked-toolchain
Browse files Browse the repository at this point in the history
Use correct name for undefined linked toolchain invocation
  • Loading branch information
brson authored Mar 31, 2017
2 parents f9077d2 + 645f2d9 commit c18094e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
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() {
"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"));
});
}

0 comments on commit c18094e

Please sign in to comment.