uv python install: remove the existing version only after the new installation is downloaded successfully (#8485)
## Summary This PR delays the removal of an existing version after downloading the new version when running `uv python install --reinstall`. If the download fails, we can keep the existing version working. ## Test Plan ```console $ cargo run -- python install 3.13 $ cargo run -- python install --reinstall 3.13 # when downloading, `ctrl-c` to interrupt $ cargo run -- python list ```
This commit is contained in:
@@ -132,7 +132,7 @@ impl PythonInstallation {
|
||||
|
||||
info!("Fetching requested Python...");
|
||||
let result = download
|
||||
.fetch(&client, installations_dir, &cache_dir, reporter)
|
||||
.fetch(&client, installations_dir, &cache_dir, false, reporter)
|
||||
.await?;
|
||||
|
||||
let path = match result {
|
||||
|
||||
Reference in New Issue
Block a user