Function
render_transition_result
(
repository: &Repository,
action: &str,
operation_id: atomic_core::OperationId,
json_output: bool,
)
Source from the content-addressed store, hash-verified
| 187 | } |
| 188 | |
| 189 | fn render_transition_result( |
| 190 | repository: &Repository, |
| 191 | action: &str, |
| 192 | operation_id: atomic_core::OperationId, |
| 193 | json_output: bool, |
| 194 | ) -> CliResult<()> { |
| 195 | let details = repository |
| 196 | .operation_details(operation_id) |
| 197 | .map_err(CliError::Repository)?; |
| 198 | let output = OperationDetailsDto::from(&details); |
| 199 | if json_output { |
| 200 | println!("{}", json(&output)?); |
| 201 | } else { |
| 202 | println!("{action} completed as operation {operation_id}"); |
| 203 | } |
| 204 | Ok(()) |
| 205 | } |
| 206 | |
| 207 | fn open_operation_repository() -> CliResult<Repository> { |
| 208 | let root = find_repository_root()?; |
Tested by
no test coverage detected