Skip to content

Commit 739e41c

Browse files
authored
fix(launcher): apply cache settings to all uv invocations (ankitects#4404)
1 parent 9eb6ec4 commit 739e41c

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

qt/launcher/src/main.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,6 @@ fn handle_version_install_or_update(state: &State, choice: MainMenuChoice) -> Re
327327
}
328328

329329
command
330-
.env("UV_CACHE_DIR", &state.uv_cache_dir)
331330
.env("UV_PYTHON_INSTALL_DIR", &state.uv_python_install_dir)
332331
.env(
333332
"UV_HTTP_TIMEOUT",
@@ -346,10 +345,6 @@ fn handle_version_install_or_update(state: &State, choice: MainMenuChoice) -> Re
346345
}
347346
}
348347

349-
if state.no_cache_marker.exists() {
350-
command.env("UV_NO_CACHE", "1");
351-
}
352-
353348
match command.ensure_success() {
354349
Ok(_) => {
355350
// Sync succeeded
@@ -1024,6 +1019,12 @@ fn uv_command(state: &State) -> Result<Command> {
10241019
.env("UV_DEFAULT_INDEX", &pypi_mirror);
10251020
}
10261021

1022+
if state.no_cache_marker.exists() {
1023+
command.env("UV_NO_CACHE", "1");
1024+
} else {
1025+
command.env("UV_CACHE_DIR", &state.uv_cache_dir);
1026+
}
1027+
10271028
// have uv use the system certstore instead of webpki-roots'
10281029
command.env("UV_NATIVE_TLS", "1");
10291030

0 commit comments

Comments
 (0)