From 222a868e691e12169528d8103614895e74e7bdb7 Mon Sep 17 00:00:00 2001 From: llama Date: Fri, 31 Oct 2025 21:26:40 +0800 Subject: [PATCH] port 739e41ce1 --- qt/launcher-gui/src-tauri/src/uv.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/qt/launcher-gui/src-tauri/src/uv.rs b/qt/launcher-gui/src-tauri/src/uv.rs index 13ef85223..4f5d578aa 100644 --- a/qt/launcher-gui/src-tauri/src/uv.rs +++ b/qt/launcher-gui/src-tauri/src/uv.rs @@ -225,7 +225,6 @@ where venv_command.ensure_success()?; } - command.env("UV_CACHE_DIR", &state.uv_cache_dir); command.env("UV_PYTHON_INSTALL_DIR", &state.uv_python_install_dir); command.env( "UV_HTTP_TIMEOUT", @@ -244,10 +243,6 @@ where } } - if state.no_cache_marker.exists() { - command.env("UV_NO_CACHE", "1"); - } - // NOTE: pty and child must live in the same thread let pty_system = portable_pty::NativePtySystem::default(); @@ -695,6 +690,12 @@ fn uv_command(state: &Paths) -> 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); + } + #[cfg(windows)] { use std::os::windows::process::CommandExt;