Remove the deployed bundle dir (idempotent; only touches the tracedecay marketplace dir).
(home: &Path)
| 418 | /// Remove the deployed bundle dir (idempotent; only touches the tracedecay |
| 419 | /// marketplace dir). |
| 420 | fn remove_deployed_bundle(home: &Path) -> Result<()> { |
| 421 | let deploy_dir = plugin_deploy_dir(home); |
| 422 | match std::fs::remove_dir_all(&deploy_dir) { |
| 423 | Ok(()) => { |
| 424 | eprintln!( |
| 425 | "\x1b[32m✔\x1b[0m Removed deployed plugin bundle at {}", |
| 426 | deploy_dir.display() |
| 427 | ); |
| 428 | Ok(()) |
| 429 | } |
| 430 | Err(e) if e.kind() == std::io::ErrorKind::NotFound => Ok(()), |
| 431 | Err(e) => Err(TraceDecayError::Config { |
| 432 | message: format!("failed to remove {}: {e}", deploy_dir.display()), |
| 433 | }), |
| 434 | } |
| 435 | } |
| 436 | |
| 437 | // --------------------------------------------------------------------------- |
| 438 | // Plugin bundle: marketplace registration + enablement |
no test coverage detected