Skip to content

Commit

Permalink
fix: Use rustup toolchain invocations instead of rustup proxies
Browse files Browse the repository at this point in the history
On Windows, nested Cargo invocations fail if a toolchain is specified, since the nested invocations do not use the rustup proxy anymore, but use the exact executable instead, see rust-lang/rustup#3036.

To solve this issue, we now build `rustup run TOOLCHAIN cargo` commands, instead of `cargo +TOOLCHAIN`, skipping the proxies entirely.
  • Loading branch information
zalanlevai committed Feb 2, 2024
1 parent ef065bc commit 4f120d5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cargo-mutest/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ fn main() {
_ => unreachable!(),
};

let mut cmd = Command::new("cargo");
cmd.arg(format!("+{}", build::RUST_TOOLCHAIN_VERSION));
let mut cmd = Command::new("rustup");
cmd.arg("run");
cmd.arg(build::RUST_TOOLCHAIN_VERSION);
cmd.arg("cargo");
cmd.arg(cargo_subcommand);
cmd.args(cargo_args);

Expand Down

0 comments on commit 4f120d5

Please sign in to comment.