(&self)
| 38 | |
| 39 | impl Command for Sync { |
| 40 | fn run(&self) -> CliResult<()> { |
| 41 | if crate::commands::rpc::vault_sync()? { |
| 42 | return Ok(()); |
| 43 | } |
| 44 | |
| 45 | let root = find_repository_root()?; |
| 46 | let repo = crate::commands::open_repository_with_vault(&root)?; |
| 47 | |
| 48 | let updated = repo |
| 49 | .vault_record_working_copy() |
| 50 | .map_err(CliError::Repository)?; |
| 51 | |
| 52 | if updated.is_empty() { |
| 53 | println!("Vault is up to date."); |
| 54 | } else { |
| 55 | for path in &updated { |
| 56 | println!(" synced: {}", path); |
| 57 | } |
| 58 | println!("\nSynced {} vault files.", updated.len()); |
| 59 | } |
| 60 | |
| 61 | Ok(()) |
| 62 | } |
| 63 | } |
nothing calls this directly
no test coverage detected