We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f8c32be commit e992c28Copy full SHA for e992c28
plrustc/plrustc/src/main.rs
@@ -49,21 +49,13 @@ impl Callbacks for PlrustcCallbacks {
49
}
50
51
52
+
53
fn clear_env() {
- let all_var_names = std::env::vars_os()
54
- .map(|(name, _)| name)
55
- .filter(|name| {
56
- let name = name.to_string_lossy().to_lowercase();
57
- !(
58
- name.starts_with("plrust")
59
- // || name.starts_with("rust")
60
- // || name.starts_with("cargo")
61
- || name == "path"
62
- // || name == "rustflags"
63
- )
64
- })
65
- .collect::<Vec<_>>();
66
- for name in all_var_names {
+ for (name, _) in std::env::vars_os() {
+ // Can't remove `PATH`, need it to locate linker and such.
+ if name == "PATH" {
+ continue;
+ }
67
std::env::remove_var(name);
68
69
0 commit comments