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 @@ -1245,13 +1245,12 @@ where
12451245
12461246 let maybe_rustc_executable = if is_rustc_like ( executable) {
12471247 Some ( executable. to_path_buf ( ) )
1248- } else if env. iter ( ) . any ( |( k, _) | k == OsStr :: new ( "CARGO" ) ) {
1249- // If not, detect the scenario where cargo is configured to wrap rustc with something other than sccache.
1250- // This happens when sccache is used as a `RUSTC_WRAPPER` and another tool is used as a
1251- // `RUSTC_WORKSPACE_WRAPPER`. In that case rustc will be the first argument rather than the command.
1252- //
1253- // The check for the `CARGO` env acts as a guardrail against false positives.
1254- // https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-reads
1248+ } else if env
1249+ . iter ( )
1250+ . any ( |( k, _) | k == OsStr :: new ( "RUSTC_WORKSPACE_WRAPPER" ) || k == OsStr :: new ( "CARGO" ) )
1251+ {
1252+ // When sccache is used as a `RUSTC_WRAPPER` and another tool is used as a `RUSTC_WORKSPACE_WRAPPER`,
1253+ // rustc will be the first argument rather than the command.
12551254 args. iter ( )
12561255 . next ( )
12571256 . filter ( |arg1| is_rustc_like ( arg1) )
You can’t perform that action at this time.
0 commit comments