Merge pull request #224 from dtolnay/emptywrapper

Disregard empty RUSTC_WRAPPER
This commit is contained in:
David Tolnay 2024-04-19 12:09:08 -07:00 committed by GitHub
commit cd88d66e0a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -177,7 +177,8 @@ fn do_cargo_expand() -> Result<i32> {
if needs_rustc_bootstrap() {
if let Ok(current_exe) = env::current_exe() {
let original_wrapper = env::var_os("RUSTC_WRAPPER");
let original_wrapper =
env::var_os("RUSTC_WRAPPER").filter(|wrapper| !wrapper.is_empty());
let wrapper = original_wrapper.as_deref().unwrap_or(OsStr::new("/"));
cmd.env(CARGO_EXPAND_RUSTC_WRAPPER, wrapper);
cmd.env("RUSTC_WRAPPER", current_exe);