diff options
Diffstat (limited to 'src/command/remove_remote.rs')
| -rw-r--r-- | src/command/remove_remote.rs | 7 |
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>> { |