- 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(())