mirror of
https://github.com/containers/podman.git
synced 2025-06-03 12:17:13 +08:00
manifest push --rm: use libimage for removal
Use libimage for removing the manifest instead of going directly through the store. [NO TESTS NEEDED] Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
@ -355,8 +355,8 @@ func (ir *ImageEngine) ManifestPush(ctx context.Context, name, destination strin
|
|||||||
}
|
}
|
||||||
|
|
||||||
if opts.Rm {
|
if opts.Rm {
|
||||||
if _, err := ir.Libpod.GetStore().DeleteImage(manifestList.ID(), true); err != nil {
|
if _, rmErrors := ir.Libpod.LibimageRuntime().RemoveImages(ctx, []string{manifestList.ID()}, nil); len(rmErrors) > 0 {
|
||||||
return "", errors.Wrap(err, "error removing manifest after push")
|
return "", errors.Wrap(rmErrors[0], "error removing manifest after push")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user