- create_dir_all(&configuration.config_directory)?;
- let input = input.expect("You must provide a location for the remote.");
- write(&configuration.remote_config, input)?;
- return Ok(())
+ let input = input
+ .ok_or_else(|| Error::new(Other, "You must provide a location for the remote."))?;
+ add(&configuration.config_directory, &configuration.remote_config, input)