diff options
| author | Ruben Beltran del Rio <git@r.bdr.sh> | 2024-03-09 15:34:57 +0100 |
|---|---|---|
| committer | Ruben Beltran del Rio <git@r.bdr.sh> | 2024-03-09 15:34:57 +0100 |
| commit | 50f53dc480fda8b3daab7a34454c2dd9f3f5f991 (patch) | |
| tree | 2205be7a9c806ce59c851de9b50b9e18f973008d /src/command/sync_down.rs | |
| parent | 172f4c8807d44ebe38c7f227b7fdc2d6a9dbe323 (diff) | |
Improve the error handlingrust
Diffstat (limited to 'src/command/sync_down.rs')
| -rw-r--r-- | src/command/sync_down.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/command/sync_down.rs b/src/command/sync_down.rs index bba34b2..eb8e57a 100644 --- a/src/command/sync_down.rs +++ b/src/command/sync_down.rs @@ -16,8 +16,13 @@ impl super::Command for SyncDown { } fn execute(&self, _: Option<&String>, configuration: &Configuration, command: &String) -> Result<()> { - if command == self.command() { - return sync_down(&configuration.data_directory, &configuration.remote_config); + match sync_down(&configuration.data_directory, &configuration.remote_config) { + Ok(_) => {} + Err(e) => { + if command == self.command() { + return Err(e) + } + } } return Ok(()) } |