(&self)
| 48 | |
| 49 | impl Command for Materialize { |
| 50 | fn run(&self) -> CliResult<()> { |
| 51 | // Route every form through the service layer (the handler runs the |
| 52 | // same vault_materialize/_all domain calls). |
| 53 | if crate::commands::rpc::vault_materialize(self)? { |
| 54 | return Ok(()); |
| 55 | } |
| 56 | |
| 57 | let root = find_repository_root()?; |
| 58 | let repo = crate::commands::open_repository_with_vault(&root)?; |
| 59 | |
| 60 | if let Some(ref path) = self.path { |
| 61 | repo.vault_materialize(path).map_err(CliError::Repository)?; |
| 62 | println!("Materialized: {}", path); |
| 63 | } else { |
| 64 | let count = repo.vault_materialize_all().map_err(CliError::Repository)?; |
| 65 | println!("Materialized {} vault entries.", count); |
| 66 | } |
| 67 | |
| 68 | Ok(()) |
| 69 | } |
| 70 | } |
nothing calls this directly
no test coverage detected