mirror of
https://github.com/ankitects/anki.git
synced 2025-11-06 12:47:11 -05:00
fix(launcher): apply cache settings to all uv invocations (#4404)
This commit is contained in:
parent
9eb6ec4db8
commit
739e41ce16
1 changed files with 6 additions and 5 deletions
|
|
@ -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<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);
|
||||
}
|
||||
|
||||
// have uv use the system certstore instead of webpki-roots'
|
||||
command.env("UV_NATIVE_TLS", "1");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue