File tree 1 file changed +2
-11
lines changed
1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -1194,20 +1194,11 @@ impl<'a> Builder<'a> {
1194
1194
}
1195
1195
1196
1196
pub fn cargo_clippy_cmd ( & self , run_compiler : Compiler ) -> Command {
1197
- let initial_sysroot_bin = self . initial_rustc . parent ( ) . unwrap ( ) ;
1198
- // 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.
1200
- let path = t ! ( env:: join_paths(
1201
- // The sysroot comes first in PATH to avoid using rustup's cargo.
1202
- std:: iter:: once( PathBuf :: from( initial_sysroot_bin) )
1203
- . chain( env:: split_paths( & t!( env:: var( "PATH" ) ) ) )
1204
- ) ) ;
1205
-
1206
1197
if run_compiler. stage == 0 {
1207
1198
// `ensure(Clippy { stage: 0 })` *builds* clippy with stage0, it doesn't use the beta clippy.
1208
1199
let cargo_clippy = self . build . config . download_clippy ( ) ;
1209
1200
let mut cmd = Command :: new ( cargo_clippy) ;
1210
- cmd. env ( "PATH " , & path ) ;
1201
+ cmd. env ( "CARGO " , & self . initial_cargo ) ;
1211
1202
return cmd;
1212
1203
}
1213
1204
@@ -1227,7 +1218,7 @@ impl<'a> Builder<'a> {
1227
1218
1228
1219
let mut cmd = Command :: new ( cargo_clippy) ;
1229
1220
cmd. env ( helpers:: dylib_path_var ( ) , env:: join_paths ( & dylib_path) . unwrap ( ) ) ;
1230
- cmd. env ( "PATH " , path ) ;
1221
+ cmd. env ( "CARGO " , & self . initial_cargo ) ;
1231
1222
cmd
1232
1223
}
1233
1224
You can’t perform that action at this time.
0 commit comments