summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/symlink.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/symlink.rs b/src/symlink.rs
index 3883172..843115c 100644
--- a/src/symlink.rs
+++ b/src/symlink.rs
@@ -10,6 +10,14 @@ impl SymlinkManager {
pub fn new() -> Self {
Self {}
}
+ pub async fn remove(&self, executable: &str) -> Result<(), Box<dyn std::error::Error>> {
+ let home = std::env::var("HOME")?;
+ let symlink_path = PathBuf::from(home).join(".local/bin").join(executable);
+
+ fs::remove_file(symlink_path).await?;
+
+ Ok(())
+ }
pub async fn create(&self, appimage: &AppImage) -> Result<(), Box<dyn std::error::Error>> {
let home = std::env::var("HOME")?;
let local_bin = PathBuf::from(home).join(".local/bin");