mirror of https://github.com/mamba-org/mamba.git
fixed: incorrect erasing of env vars (#3622)
This commit is contained in:
parent
c0ce48bebe
commit
d4de99bfef
|
@ -554,10 +554,14 @@ namespace mamba
|
|||
auto conda_environment_env_vars = get_environment_vars(prefix);
|
||||
|
||||
// TODO check with conda if that's really what's supposed to happen ...
|
||||
std::remove_if(
|
||||
conda_environment_env_vars.begin(),
|
||||
conda_environment_env_vars.end(),
|
||||
[](auto& el) { return el.second == CONDA_ENV_VARS_UNSET_VAR; }
|
||||
// TODO: C++20 replace by `std::erase_if`
|
||||
conda_environment_env_vars.erase(
|
||||
std::remove_if(
|
||||
conda_environment_env_vars.begin(),
|
||||
conda_environment_env_vars.end(),
|
||||
[](auto& el) { return el.second == CONDA_ENV_VARS_UNSET_VAR; }
|
||||
),
|
||||
conda_environment_env_vars.end()
|
||||
);
|
||||
|
||||
std::vector<std::string> clobbering_env_vars;
|
||||
|
|
Loading…
Reference in New Issue