mirror of https://github.com/astral-sh/uv
Merge ac0ea6651b into b58f543e5e
This commit is contained in:
commit
76cfd515fa
|
|
@ -316,14 +316,18 @@ impl InstalledTools {
|
||||||
let environment_path = self.tool_dir(name);
|
let environment_path = self.tool_dir(name);
|
||||||
|
|
||||||
// Remove any existing environment.
|
// Remove any existing environment.
|
||||||
match fs_err::remove_dir_all(&environment_path) {
|
match remove_virtualenv(&environment_path) {
|
||||||
Ok(()) => {
|
Ok(()) => {
|
||||||
debug!(
|
debug!(
|
||||||
"Removed existing environment for tool `{name}`: {}",
|
"Removed existing environment for tool `{name}`: {}",
|
||||||
environment_path.user_display()
|
environment_path.user_display()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Err(err) if err.kind() == io::ErrorKind::NotFound => (),
|
Err(uv_virtualenv::Error::Io(err)) => {
|
||||||
|
if err.kind() != io::ErrorKind::NotFound {
|
||||||
|
return Err(err.into());
|
||||||
|
}
|
||||||
|
}
|
||||||
Err(err) => return Err(err.into()),
|
Err(err) => return Err(err.into()),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue