Skip to content

Commit 696b279

Browse files
committed
Fix toolchain auto installation through rustup-toolchain-install-master
rustup no longer uses 101 exit code when it fails to locate the toolchain: ```console $ rustup which rustc --toolchain f426146460c5446bb41ac0b677bbfe5b6ff502ba error: toolchain 'f426146460c5446bb41ac0b677bbfe5b6ff502ba' is not installed $ echo $? 1 ```
1 parent fd61116 commit 696b279

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

collector/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ fn get_local_toolchain(
430430
.context("failed to run `rustup which rustc`")?;
431431

432432
// Looks like a commit hash? Try to install it...
433-
if output.status.code() == Some(101) && toolchain.len() == 40 {
433+
if !output.status.success() && toolchain.len() == 40 {
434434
// No such toolchain exists, so let's try to install it with
435435
// rustup-toolchain-install-master.
436436

0 commit comments

Comments
 (0)