Skip to content

Commit d5c6cbb

Browse files
Prevent rustup from automatically installing toolchains
By setting RUSTUP_AUTO_INSTALL=0.
1 parent e7d7cb4 commit d5c6cbb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

crates/toolchain/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ pub fn command<H>(
8181
#[allow(clippy::disallowed_methods)]
8282
let mut cmd = Command::new(cmd);
8383
cmd.current_dir(working_directory);
84+
// Prevent rustup from automatically installing toolchains, see https://github.com/rust-lang/rust-analyzer/issues/20719.
85+
cmd.env("RUSTUP_AUTO_INSTALL", "0");
8486
for env in extra_env {
8587
match env {
8688
(key, Some(val)) => cmd.env(key, val),

0 commit comments

Comments
 (0)