File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1412,8 +1412,11 @@ impl Xtasks {
1412
1412
/// Set them to MAIN_CARGO_<VARIABLE> so that we can reference them but so they dont get inherited by further cargo commands
1413
1413
fn pop_cargo_env ( ) -> Result < ( ) > {
1414
1414
let env = std:: env:: vars ( ) . collect :: < Vec < _ > > ( ) ;
1415
+ // RUSTUP TOOLCHAIN exclude is a temporary fix, it might make deving the api codegen crate not work
1416
+ let exclude_list = [ "CARGO_HOME" , "RUSTUP_TOOLCHAIN" ] ;
1417
+
1415
1418
for ( key, value) in env. iter ( ) {
1416
- if key. starts_with ( "CARGO_" ) {
1419
+ if key. starts_with ( "CARGO_" ) && !exclude_list . contains ( & ( key . as_str ( ) ) ) {
1417
1420
let new_key = format ! ( "MAIN_{}" , key) ;
1418
1421
std:: env:: set_var ( new_key, value) ;
1419
1422
std:: env:: remove_var ( key) ;
@@ -1423,6 +1426,9 @@ fn pop_cargo_env() -> Result<()> {
1423
1426
// unset some other variables
1424
1427
let remove_vars = [ "RUSTUP_TOOLCHAIN" ] ;
1425
1428
for var in remove_vars. iter ( ) {
1429
+ if exclude_list. contains ( var) {
1430
+ continue ;
1431
+ }
1426
1432
std:: env:: remove_var ( var) ;
1427
1433
}
1428
1434
You can’t perform that action at this time.
0 commit comments