diff --git a/crates/uv-tool/src/lib.rs b/crates/uv-tool/src/lib.rs index b649fbad2..dd7a5eb39 100644 --- a/crates/uv-tool/src/lib.rs +++ b/crates/uv-tool/src/lib.rs @@ -314,14 +314,14 @@ impl InstalledTools { let environment_path = self.tool_dir(name); // Remove any existing environment. - match fs_err::remove_dir_all(&environment_path) { + match remove_virtualenv(&environment_path) { Ok(()) => { debug!( "Removed existing environment for tool `{name}`: {}", environment_path.user_display() ); } - Err(err) if err.kind() == io::ErrorKind::NotFound => (), + Err(uv_virtualenv::Error::Io(err)) if err.kind() == io::ErrorKind::NotFound => (), Err(err) => return Err(err.into()), }