mirror of
https://github.com/containers/podman.git
synced 2025-07-15 03:02:52 +08:00
podman images --digest: always list a digest
When we're asked to display image digests, always provide them if we have values that we can provide. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
This commit is contained in:
@ -291,6 +291,10 @@ func getImagesTemplateOutput(ctx context.Context, images []*adapter.ContainerIma
|
|||||||
if len(tag) == 71 && strings.HasPrefix(tag, "sha256:") {
|
if len(tag) == 71 && strings.HasPrefix(tag, "sha256:") {
|
||||||
imageDigest = digest.Digest(tag)
|
imageDigest = digest.Digest(tag)
|
||||||
tag = ""
|
tag = ""
|
||||||
|
} else {
|
||||||
|
if img.Digest() != "" {
|
||||||
|
imageDigest = img.Digest()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
params := imagesTemplateParams{
|
params := imagesTemplateParams{
|
||||||
Repository: repo,
|
Repository: repo,
|
||||||
|
Reference in New Issue
Block a user