Skip to content

Commit c1316c3

Browse files
committed
DNM Don't filter path
1 parent 046a492 commit c1316c3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

plrustc/plrustc/src/main.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ use rustc_session::parse::ParseSess;
2020
use rustc_session::EarlyErrorHandler;
2121
use rustc_span::source_map::FileLoader;
2222
use rustc_span::Symbol;
23+
use std::collections::HashMap;
2324
use std::path::Path;
2425

2526
const PLRUSTC_USER_CRATE_NAME: &str = "PLRUSTC_USER_CRATE_NAME";
@@ -54,11 +55,11 @@ fn clear_env() {
5455
.map(|(name, _)| name)
5556
.filter(|name| {
5657
let name = name.to_string_lossy().to_lowercase();
57-
!(name.starts_with("rust") || name.starts_with("plrust"))
58+
!(name.starts_with("rust") || name.starts_with("plrust") || name.starts_with("cargo") || name == "path")
5859
})
5960
.collect::<Vec<_>>();
6061
for name in all_var_names {
61-
std::env::set_var(name, "");
62+
std::env::remove_var(name);
6263
}
6364
}
6465

0 commit comments

Comments
 (0)