aboutsummaryrefslogtreecommitdiff
path: root/src/command/remove_remote.rs
diff options
context:
space:
mode:
authorRuben Beltran del Rio <git@r.bdr.sh>2024-03-09 14:17:34 +0100
committerRuben Beltran del Rio <git@r.bdr.sh>2024-03-09 14:17:34 +0100
commit172f4c8807d44ebe38c7f227b7fdc2d6a9dbe323 (patch)
treeb880761cf254fbc668cea0d577d5331a28af67cc /src/command/remove_remote.rs
parent36a4680d18de012e2e5c732f9db161dafa884344 (diff)
Allow sync up and down
Diffstat (limited to 'src/command/remove_remote.rs')
-rw-r--r--src/command/remove_remote.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/command/remove_remote.rs b/src/command/remove_remote.rs
index b2f554c..7590487 100644
--- a/src/command/remove_remote.rs
+++ b/src/command/remove_remote.rs
@@ -1,6 +1,6 @@
-use std::fs::remove_file;
use std::io::Result;
use crate::configuration::Configuration;
+use crate::remote::remove;
pub struct RemoveRemote;
@@ -16,10 +16,7 @@ impl super::Command for RemoveRemote {
}
fn execute(&self, _: Option<&String>, configuration: &Configuration, _: &String) -> Result<()> {
- if configuration.remote_config.exists() {
- remove_file(&configuration.remote_config)?;
- }
- return Ok(())
+ remove(&configuration.remote_config)
}
fn after_dependencies(&self) -> Vec<Box<dyn super::Command>> {