Skip to content

Commit

Permalink
Update containers.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
lachsdachs authored Feb 19, 2025
1 parent fa3e472 commit 22f1ebe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/steps/containers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,11 @@ pub fn run_containers(ctx: &ExecutionContext) -> Result<()> {
if ctx.config().cleanup() {
// Remove dangling images
debug!("Removing dangling images");
let sudo = require_option(ctx.sudo().as_ref(), get_require_sudo_string())?;
if let Err(e) = ctx
.run_type()
.execute(&crt)
.args(["image", "prune", "-f"])
.execute(sudo)
.args([&crt, "image", "prune", "-f"])
.status_checked()
{
error!("Removing dangling images failed: {}", e);
Expand Down

0 comments on commit 22f1ebe

Please sign in to comment.