mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-16 13:05:18 +03:00
Unset test env vars before setting new ones.
If you want to override an env var, don't unset it, just set it
This commit is contained in:
@@ -2173,8 +2173,8 @@ fn compose_and_run_compiler(&self, mut rustc: Command, input: Option<String>) ->
|
||||
let aux_dir = self.aux_output_dir();
|
||||
self.build_all_auxiliary(&self.testpaths, &aux_dir, &mut rustc);
|
||||
|
||||
self.props.unset_rustc_env.iter().fold(&mut rustc, Command::env_remove);
|
||||
rustc.envs(self.props.rustc_env.clone());
|
||||
self.props.unset_rustc_env.iter().fold(&mut rustc, Command::env_remove);
|
||||
self.compose_and_run(
|
||||
rustc,
|
||||
self.config.compile_lib_path.to_str().unwrap(),
|
||||
@@ -2220,10 +2220,10 @@ fn build_auxiliary(
|
||||
);
|
||||
aux_cx.build_all_auxiliary(of, &aux_dir, &mut aux_rustc);
|
||||
|
||||
aux_rustc.envs(aux_props.rustc_env.clone());
|
||||
for key in &aux_props.unset_rustc_env {
|
||||
aux_rustc.env_remove(key);
|
||||
}
|
||||
aux_rustc.envs(aux_props.rustc_env.clone());
|
||||
|
||||
let (aux_type, crate_type) = if is_bin {
|
||||
(AuxType::Bin, Some("bin"))
|
||||
|
||||
Reference in New Issue
Block a user