Skip to content

Commit 77e110d

Browse files
Avoid expensive rustup-toolchain-install-master invocation
This installs the master commit toolchain, which is fairly slow -- and entirely unnecessary.
1 parent 307bf1a commit 77e110d

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

collector/src/main.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1062,8 +1062,17 @@ fn main_result() -> anyhow::Result<i32> {
10621062
let rustdoc = sub_m.value_of("RUSTDOC");
10631063
check_installed("valgrind")?;
10641064
check_installed("cg_annotate")?;
1065-
check_installed("rustup-toolchain-install-master")?;
10661065
check_installed("rustfilt")?;
1066+
// Avoid just straight running rustup-toolchain-install-master which
1067+
// will install the current master commit (fetching quite a bit of
1068+
// data, including hitting GitHub)...
1069+
if Command::new("rustup-toolchain-install-master")
1070+
.arg("-V")
1071+
.output()
1072+
.is_err()
1073+
{
1074+
anyhow::bail!("rustup-toolchain-install-master is not installed but must be");
1075+
}
10671076

10681077
let id1 = rustc1.strip_prefix('+').unwrap_or("before");
10691078
let id2 = rustc2.strip_prefix('+').unwrap_or("after");

0 commit comments

Comments
 (0)