From 5e3e41daee4f51a425b251bf3b2339fbf0628a8e Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Wed, 6 Nov 2019 17:35:26 -0500 Subject: 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 --- cmd/podman/images.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/podman/images.go b/cmd/podman/images.go index 6157fda2a..7d498517c 100644 --- a/cmd/podman/images.go +++ b/cmd/podman/images.go @@ -291,6 +291,10 @@ func getImagesTemplateOutput(ctx context.Context, images []*adapter.ContainerIma if len(tag) == 71 && strings.HasPrefix(tag, "sha256:") { imageDigest = digest.Digest(tag) tag = "" + } else { + if img.Digest() != "" { + imageDigest = img.Digest() + } } params := imagesTemplateParams{ Repository: repo, -- cgit v1.2.3-54-g00ecf