aboutsummaryrefslogtreecommitdiff
path: root/src/command/remove_remote.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/command/remove_remote.rs')
-rw-r--r--src/command/remove_remote.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/command/remove_remote.rs b/src/command/remove_remote.rs
index 8188beb..b2f554c 100644
--- a/src/command/remove_remote.rs
+++ b/src/command/remove_remote.rs
@@ -1,3 +1,4 @@
+use std::fs::remove_file;
use std::io::Result;
use crate::configuration::Configuration;
@@ -14,8 +15,10 @@ impl super::Command for RemoveRemote {
vec![]
}
- fn execute(&self, input: Option<&String>, _: &Configuration, _: &String) -> Result<()> {
- println!("Remove Remote: {:?}!", input);
+ fn execute(&self, _: Option<&String>, configuration: &Configuration, _: &String) -> Result<()> {
+ if configuration.remote_config.exists() {
+ remove_file(&configuration.remote_config)?;
+ }
return Ok(())
}