Exclude VIRTUAL_ENV from environ as well

https://forums.ankiweb.net/t/anki-25-08-beta/63645/51
This commit is contained in:
Damien Elmes 2025-07-15 16:27:21 +07:00
parent 5a19027185
commit 834fb41015
2 changed files with 2 additions and 2 deletions

View file

@ -36,7 +36,7 @@ pub fn setup_pyenv(args: PyenvArgs) {
// remove UV_* environment variables to avoid interference // remove UV_* environment variables to avoid interference
for (key, _) in std::env::vars() { for (key, _) in std::env::vars() {
if key.starts_with("UV_") { if key.starts_with("UV_") || key == "VIRTUAL_ENV" {
command.env_remove(key); command.env_remove(key);
} }
} }

View file

@ -269,7 +269,7 @@ fn handle_version_install_or_update(state: &State, choice: MainMenuChoice) -> Re
// remove UV_* environment variables to avoid interference // remove UV_* environment variables to avoid interference
for (key, _) in std::env::vars() { for (key, _) in std::env::vars() {
if key.starts_with("UV_") { if key.starts_with("UV_") || key == "VIRTUAL_ENV" {
command.env_remove(key); command.env_remove(key);
} }
} }