From aa8e60efe2e5b2495a945850f395f82583827c45 Mon Sep 17 00:00:00 2001 From: llama Date: Mon, 20 Oct 2025 07:07:51 +0800 Subject: [PATCH] fix(launcher): apply cache settings to all uv invocations --- qt/launcher/src/main.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/qt/launcher/src/main.rs b/qt/launcher/src/main.rs index 26fbe86a7..0beb85710 100644 --- a/qt/launcher/src/main.rs +++ b/qt/launcher/src/main.rs @@ -325,7 +325,6 @@ fn handle_version_install_or_update(state: &State, choice: MainMenuChoice) -> Re } command - .env("UV_CACHE_DIR", &state.uv_cache_dir) .env("UV_PYTHON_INSTALL_DIR", &state.uv_python_install_dir) .env( "UV_HTTP_TIMEOUT", @@ -344,10 +343,6 @@ fn handle_version_install_or_update(state: &State, choice: MainMenuChoice) -> Re } } - if state.no_cache_marker.exists() { - command.env("UV_NO_CACHE", "1"); - } - match command.ensure_success() { Ok(_) => { // Sync succeeded @@ -1013,6 +1008,12 @@ fn uv_command(state: &State) -> Result { .env("UV_DEFAULT_INDEX", &pypi_mirror); } + if state.no_cache_marker.exists() { + command.env("UV_NO_CACHE", "1"); + } else { + command.env("UV_CACHE_DIR", &state.uv_cache_dir); + } + Ok(command) }