mamba-org / mamba

The Fast Cross-Platform Package Manager
https://mamba.readthedocs.io
BSD 3-Clause "New" or "Revised" License
6.97k stars 359 forks source link

fixed: incorrect erasing of env vars #3622

Closed Klaim closed 1 week ago

Klaim commented 1 week ago

The expectaction of this change is that the intent was to remove elements (env vars values) from that vector, in which case an erase was missing as remove_if will not remove elements, just move them around and report where the new range ends (c++20's std::erase_if would have done the job more properly here - or replacing the container by a flat_map).