mirror of
https://github.com/ankitects/anki.git
synced 2025-11-07 05:07:10 -05:00
fix(launcher): apply cache settings to all uv invocations
This commit is contained in:
parent
321e23acb2
commit
aa8e60efe2
1 changed files with 6 additions and 5 deletions
|
|
@ -325,7 +325,6 @@ fn handle_version_install_or_update(state: &State, choice: MainMenuChoice) -> Re
|
||||||
}
|
}
|
||||||
|
|
||||||
command
|
command
|
||||||
.env("UV_CACHE_DIR", &state.uv_cache_dir)
|
|
||||||
.env("UV_PYTHON_INSTALL_DIR", &state.uv_python_install_dir)
|
.env("UV_PYTHON_INSTALL_DIR", &state.uv_python_install_dir)
|
||||||
.env(
|
.env(
|
||||||
"UV_HTTP_TIMEOUT",
|
"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() {
|
match command.ensure_success() {
|
||||||
Ok(_) => {
|
Ok(_) => {
|
||||||
// Sync succeeded
|
// Sync succeeded
|
||||||
|
|
@ -1013,6 +1008,12 @@ fn uv_command(state: &State) -> Result<Command> {
|
||||||
.env("UV_DEFAULT_INDEX", &pypi_mirror);
|
.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)
|
Ok(command)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue