From 739e41ce16cceffad9ce25e1bbcfe34b70ebbe91 Mon Sep 17 00:00:00 2001 From: llama Date: Mon, 27 Oct 2025 20:42:45 +0800 Subject: [PATCH] fix(launcher): apply cache settings to all uv invocations (#4404) --- 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 a399a3460..dab9435ea 100644 --- a/qt/launcher/src/main.rs +++ b/qt/launcher/src/main.rs @@ -327,7 +327,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", @@ -346,10 +345,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 @@ -1024,6 +1019,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); + } + // have uv use the system certstore instead of webpki-roots' command.env("UV_NATIVE_TLS", "1");