(
no_heal: bool,
no_reinstall: bool,
installed: Option<&Path>,
)
| 224 | } |
| 225 | |
| 226 | fn run_post_update_subcommand( |
| 227 | no_heal: bool, |
| 228 | no_reinstall: bool, |
| 229 | installed: Option<&Path>, |
| 230 | ) -> tracedecay::errors::Result<()> { |
| 231 | let tracedecay_bin = post_update_binary(installed)?; |
| 232 | let mut command = std::process::Command::new(&tracedecay_bin); |
| 233 | command.arg("post-update"); |
| 234 | if no_heal { |
| 235 | command.arg("--no-heal"); |
| 236 | } |
| 237 | if no_reinstall { |
| 238 | command.arg("--no-reinstall"); |
| 239 | } |
| 240 | let status = command |
| 241 | .status() |
| 242 | .map_err(|e| tracedecay::errors::TraceDecayError::Config { |
| 243 | message: format!("failed to run post-update with '{tracedecay_bin}': {e}"), |
| 244 | })?; |
| 245 | if status.success() { |
| 246 | return Ok(()); |
| 247 | } |
| 248 | Err(tracedecay::errors::TraceDecayError::Config { |
| 249 | message: format!("post-update failed with status: {status}"), |
| 250 | }) |
| 251 | } |
| 252 | |
| 253 | /// The result of a tracked-agent reinstall pass. Version markers may only |
| 254 | /// advance on [`ReinstallOutcome::AllOk`]; a partial failure leaves the |
no test coverage detected