File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ use rustc_session::parse::ParseSess;
20
20
use rustc_session:: EarlyErrorHandler ;
21
21
use rustc_span:: source_map:: FileLoader ;
22
22
use rustc_span:: Symbol ;
23
+ use std:: collections:: HashMap ;
23
24
use std:: path:: Path ;
24
25
25
26
const PLRUSTC_USER_CRATE_NAME : & str = "PLRUSTC_USER_CRATE_NAME" ;
@@ -54,11 +55,11 @@ fn clear_env() {
54
55
. map ( |( name, _) | name)
55
56
. filter ( |name| {
56
57
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" )
58
59
} )
59
60
. collect :: < Vec < _ > > ( ) ;
60
61
for name in all_var_names {
61
- std:: env:: set_var ( name, "" ) ;
62
+ std:: env:: remove_var ( name) ;
62
63
}
63
64
}
64
65
You can’t perform that action at this time.
0 commit comments