File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -1292,13 +1292,12 @@ where
12921292
12931293 let maybe_rustc_executable = if is_rustc_like ( executable) {
12941294 Some ( executable. to_path_buf ( ) )
1295- } else if env. iter ( ) . any ( |( k, _) | k == OsStr :: new ( "CARGO" ) ) {
1296- // If not, detect the scenario where cargo is configured to wrap rustc with something other than sccache.
1297- // This happens when sccache is used as a `RUSTC_WRAPPER` and another tool is used as a
1298- // `RUSTC_WORKSPACE_WRAPPER`. In that case rustc will be the first argument rather than the command.
1299- //
1300- // The check for the `CARGO` env acts as a guardrail against false positives.
1301- // https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-reads
1295+ } else if env
1296+ . iter ( )
1297+ . any ( |( k, _) | k == OsStr :: new ( "RUSTC_WORKSPACE_WRAPPER" ) || k == OsStr :: new ( "CARGO" ) )
1298+ {
1299+ // When sccache is used as a `RUSTC_WRAPPER` and another tool is used as a `RUSTC_WORKSPACE_WRAPPER`,
1300+ // rustc will be the first argument rather than the command.
13021301 args. iter ( )
13031302 . next ( )
13041303 . filter ( |arg1| is_rustc_like ( arg1) )
You can’t perform that action at this time.
0 commit comments