+use crate::configuration::Configuration;
+use crate::remote::sync_down;
use std::io::Result;
pub struct SyncDown;
vec![]
}
- fn execute(&self, input: Option<&String>) -> Result<()> {
- println!("Sync Down: {:?}!", input);
- return Ok(())
+ fn execute(
+ &self,
+ _: Option<&String>,
+ configuration: &Configuration,
+ command: &str,
+ ) -> Result<()> {
+ match sync_down(&configuration.data_directory, &configuration.remote_config) {
+ Ok(()) => {}
+ Err(e) => {
+ if command == self.command() {
+ return Err(e);
+ }
+ }
+ }
+ Ok(())
}
fn after_dependencies(&self) -> Vec<Box<dyn super::Command>> {
"\t\t\t\tPulls from the git remote if configured"
}
}
-