MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / run_post_update_subcommand

Function run_post_update_subcommand

src/update_cmd.rs:226–251  ·  view source on GitHub ↗
(
    no_heal: bool,
    no_reinstall: bool,
    installed: Option<&Path>,
)

Source from the content-addressed store, hash-verified

224}
225
226fn 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

Callers 2

run_update_commandFunction · 0.85
run_upgrade_commandFunction · 0.85

Calls 3

post_update_binaryFunction · 0.85
statusMethod · 0.80
successMethod · 0.80

Tested by

no test coverage detected