diff options
Diffstat (limited to 'src/command/sync.rs')
-rw-r--r-- | src/command/sync.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/command/sync.rs b/src/command/sync.rs new file mode 100644 index 00000000..facbe578 --- /dev/null +++ b/src/command/sync.rs @@ -0,0 +1,15 @@ +use eyre::Result; + +use crate::local::database::Database; +use crate::local::sync; +use crate::settings::Settings; + +pub fn run(settings: &Settings, force: bool, db: &mut impl Database) -> Result<()> { + sync::sync(settings, force, db)?; + println!( + "Sync complete! {} items in database, force: {}", + db.history_count()?, + force + ); + Ok(()) +} |