Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
cli: use `WriteStorage::remove` in `rm`
Fintan Halpenny committed 2 years ago
commit 9f81de7ef3dff7ea716056e11deaf48b1ddea0be
parent 703a6d80250d7cac6584811fc4553746b4e46bd7
1 file changed +2 -2
modified radicle-cli/src/commands/rm.rs
@@ -1,5 +1,4 @@
use std::ffi::OsString;
-
use std::fs;

use anyhow::anyhow;

@@ -7,6 +6,7 @@ use radicle::identity::Id;
use radicle::node;
use radicle::node::Handle as _;
use radicle::storage;
+
use radicle::storage::WriteStorage;
use radicle::Profile;

use crate::git;
@@ -82,7 +82,7 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
    if !options.confirm || term::confirm(format!("Remove {rid}?")) {
        untrack(&rid, &profile)?;
        remove_remote(&rid)?;
-
        fs::remove_dir_all(path)?;
+
        storage.remove(rid)?;
        term::success!("Successfully removed {rid} from storage");
    }