Skip to content

Commit 5decd95

Browse files
nnethercoteMark-Simulacrum
authored andcommitted
Fix Cargo selection.
`base_command` currently tries to choose the Cargo version via `$CARGO`. But `cargo` doesn't consult `$CARGO`, so this has no effect, and the `cargo` used is whatever is found in `$PATH`. This commit fixes `base_command` to use the `cargo` specified in `Compiler::cargo`.
1 parent 5880650 commit 5decd95

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

collector/src/bin/rustc-perf-collector/execute.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ impl<'a> CargoProcess<'a> {
160160
}
161161

162162
fn base_command(&self, cwd: &Path, subcommand: &str) -> Command {
163-
let mut cmd = Command::new(Path::new("cargo"));
163+
let mut cmd = Command::new(Path::new(self.compiler.cargo));
164164
cmd
165165
// Not all cargo invocations (e.g. `cargo clean`) need all of these
166166
// env vars set, but it doesn't hurt to have them.
@@ -177,7 +177,6 @@ impl<'a> CargoProcess<'a> {
177177
)
178178
.env("RUSTC", &*FAKE_RUSTC)
179179
.env("RUSTC_REAL", &self.compiler.rustc)
180-
.env("CARGO", &self.compiler.cargo)
181180
.env(
182181
"CARGO_INCREMENTAL",
183182
&format!("{}", self.incremental as usize),

0 commit comments

Comments
 (0)