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;
2020use rustc_session:: EarlyErrorHandler ;
2121use rustc_span:: source_map:: FileLoader ;
2222use rustc_span:: Symbol ;
23+ use std:: collections:: HashMap ;
2324use std:: path:: Path ;
2425
2526const 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
You can’t perform that action at this time.
0 commit comments