mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
Add uv tool uninstall
(#4641)
Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
This commit is contained in:
parent
8d9b4a5e1c
commit
7da3423af9
10 changed files with 239 additions and 5 deletions
|
@ -143,6 +143,9 @@ impl InstalledTools {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
/// Remove the environment for a tool.
|
||||
///
|
||||
/// Does not remove the tool's entrypoints.
|
||||
pub fn remove_environment(&self, name: &str) -> Result<(), Error> {
|
||||
let _lock = self.acquire_lock();
|
||||
let environment_path = self.root.join(name);
|
||||
|
|
|
@ -25,8 +25,8 @@ pub struct Tool {
|
|||
#[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Deserialize)]
|
||||
#[serde(rename_all = "kebab-case")]
|
||||
pub struct ToolEntrypoint {
|
||||
name: String,
|
||||
install_path: PathBuf,
|
||||
pub name: String,
|
||||
pub install_path: PathBuf,
|
||||
}
|
||||
|
||||
/// Format an array so that each element is on its own line and has a trailing comma.
|
||||
|
@ -105,6 +105,10 @@ impl Tool {
|
|||
|
||||
table
|
||||
}
|
||||
|
||||
pub fn entrypoints(&self) -> &[ToolEntrypoint] {
|
||||
&self.entrypoints
|
||||
}
|
||||
}
|
||||
|
||||
impl ToolEntrypoint {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue