From 834fb41015cc7cb60518f81df0977bf4ee094f84 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 15 Jul 2025 16:27:21 +0700 Subject: [PATCH] Exclude VIRTUAL_ENV from environ as well https://forums.ankiweb.net/t/anki-25-08-beta/63645/51 --- build/runner/src/pyenv.rs | 2 +- qt/launcher/src/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/runner/src/pyenv.rs b/build/runner/src/pyenv.rs index 9d65626ca..efd58fd91 100644 --- a/build/runner/src/pyenv.rs +++ b/build/runner/src/pyenv.rs @@ -36,7 +36,7 @@ pub fn setup_pyenv(args: PyenvArgs) { // remove UV_* environment variables to avoid interference for (key, _) in std::env::vars() { - if key.starts_with("UV_") { + if key.starts_with("UV_") || key == "VIRTUAL_ENV" { command.env_remove(key); } } diff --git a/qt/launcher/src/main.rs b/qt/launcher/src/main.rs index d48adaf49..e1529f794 100644 --- a/qt/launcher/src/main.rs +++ b/qt/launcher/src/main.rs @@ -269,7 +269,7 @@ fn handle_version_install_or_update(state: &State, choice: MainMenuChoice) -> Re // remove UV_* environment variables to avoid interference for (key, _) in std::env::vars() { - if key.starts_with("UV_") { + if key.starts_with("UV_") || key == "VIRTUAL_ENV" { command.env_remove(key); } }