fix(launcher): apply cache settings to all uv invocations

This commit is contained in:
llama 2025-10-20 07:07:51 +08:00
parent 321e23acb2
commit aa8e60efe2
No known key found for this signature in database
GPG key ID: 0B7543854B9413C3

View file

@ -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<Command> {
.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)
}