Skip to content

Commit

Permalink
manifest push --rm: use libimage for removal
Browse files Browse the repository at this point in the history
Use libimage for removing the manifest instead of going directly
through the store.

[NO TESTS NEEDED]

Signed-off-by: Valentin Rothberg <[email protected]>
  • Loading branch information
vrothberg committed Jul 7, 2021
1 parent c583d4d commit 38bef70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/domain/infra/abi/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,8 @@ func (ir *ImageEngine) ManifestPush(ctx context.Context, name, destination strin
}

if opts.Rm {
if _, err := ir.Libpod.GetStore().DeleteImage(manifestList.ID(), true); err != nil {
return "", errors.Wrap(err, "error removing manifest after push")
if _, rmErrors := ir.Libpod.LibimageRuntime().RemoveImages(ctx, []string{manifestList.ID()}, nil); len(rmErrors) > 0 {
return "", errors.Wrap(rmErrors[0], "error removing manifest after push")
}
}

Expand Down

0 comments on commit 38bef70

Please sign in to comment.