Skip to content

Commit 1e5adbd

Browse files
committed
Set CARGO instead of PATH for Rust Clippy
Resolves #123227
1 parent 36b6f9b commit 1e5adbd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/bootstrap/src/core/builder.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,7 +1196,6 @@ impl<'a> Builder<'a> {
11961196
pub fn cargo_clippy_cmd(&self, run_compiler: Compiler) -> Command {
11971197
let initial_sysroot_bin = self.initial_rustc.parent().unwrap();
11981198
// Set PATH to include the sysroot bin dir so clippy can find cargo.
1199-
// FIXME: once rust-clippy#11944 lands on beta, set `CARGO` directly instead.
12001199
let path = t!(env::join_paths(
12011200
// The sysroot comes first in PATH to avoid using rustup's cargo.
12021201
std::iter::once(PathBuf::from(initial_sysroot_bin))
@@ -1227,7 +1226,7 @@ impl<'a> Builder<'a> {
12271226

12281227
let mut cmd = Command::new(cargo_clippy);
12291228
cmd.env(helpers::dylib_path_var(), env::join_paths(&dylib_path).unwrap());
1230-
cmd.env("PATH", path);
1229+
cmd.env("CARGO", path);
12311230
cmd
12321231
}
12331232

0 commit comments

Comments
 (0)