Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
cli: implement the rad remote rm command
Vincenzo Palazzo committed 3 years ago
commit fb44af965324634cb741c40118abb80db004b2a0
parent 027ccb943e75ce289d2f4e7a069703d89def6d53
1 file changed +11 -0
added radicle-cli/src/commands/remote/rm.rs
@@ -0,0 +1,11 @@
+
use crate::git;
+
use crate::terminal as term;
+

+
pub fn run(repository: &git::Repository, name: &str) -> anyhow::Result<()> {
+
    if !git::is_remote(repository, name)? {
+
        anyhow::bail!("remote `{name}` not found");
+
    }
+
    repository.remote_delete(name)?;
+
    term::success!("Remote `{name}` removed");
+
    Ok(())
+
}