1 use std::io::{Error, ErrorKind::Other, Result};
2 use crate::configuration::Configuration;
3 use crate::remote::add;
13 impl super::Command for AddRemote {
14 fn before_dependencies(&self) -> Vec<Box<dyn super::Command>> {
18 fn execute(&self, input: Option<&String>, configuration: &Configuration, _: &String) -> Result<()> {
20 .ok_or_else(|| Error::new(Other, "You must provide a location for the remote."))?;
21 add(&configuration.config_directory, &configuration.remote_config, input)
24 fn after_dependencies(&self) -> Vec<Box<dyn super::Command>> {
28 fn command(&self) -> &'static str {
32 fn help(&self) -> &'static str {
33 "<git_url>\t\tAdds or updates a git remote to sync with"