From 7760fd2532b041c5c2d777ed7240c0d868642096 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 9 Jul 2025 16:09:52 +0700 Subject: [PATCH] Clear env vars prior to invoking uv, and add --no-config --- build/runner/src/pyenv.rs | 3 ++- qt/launcher/src/main.rs | 7 +++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/runner/src/pyenv.rs b/build/runner/src/pyenv.rs index d64c8fb3f..f514096fb 100644 --- a/build/runner/src/pyenv.rs +++ b/build/runner/src/pyenv.rs @@ -34,8 +34,9 @@ pub fn setup_pyenv(args: PyenvArgs) { run_command( Command::new(args.uv_bin) + .env_clear() .env("UV_PROJECT_ENVIRONMENT", args.pyenv_folder.clone()) - .args(["sync", "--locked"]) + .args(["sync", "--locked", "--no-config"]) .args(args.extra_args), ); diff --git a/qt/launcher/src/main.rs b/qt/launcher/src/main.rs index 655679c17..34a81a622 100644 --- a/qt/launcher/src/main.rs +++ b/qt/launcher/src/main.rs @@ -255,15 +255,14 @@ fn handle_version_install_or_update(state: &State, choice: MainMenuChoice) -> Re None }; - // Sync the venv + // Prepare to sync the venv let mut command = Command::new(&state.uv_path); command .current_dir(&state.uv_install_root) + .env_clear() .env("UV_CACHE_DIR", &state.uv_cache_dir) - // We always want to download python, even if the user has their system set to 'never' - .env("UV_PYTHON_DOWNLOADS", "auto") .env("UV_PYTHON_INSTALL_DIR", &state.uv_python_install_dir) - .args(["sync", "--upgrade", "--managed-python"]); + .args(["sync", "--upgrade", "--managed-python", "--no-config"]); // Add python version if .python-version file exists if let Some(version) = &python_version_trimmed {