diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2018-12-17 08:48:11 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-17 08:48:11 -0800 |
commit | 510b5a81dcea7df4c95388db0b66df17a691cb1c (patch) | |
tree | 139136aa182ffaf7f3a1e6e3d3799aad7ba3563f /cmd/podman | |
parent | a1902dc48b11573ac35fa69ebdfe09def4857efd (diff) | |
parent | 92c7f4eb9e50d0b35aa048c5149cb95ce5c4e507 (diff) | |
download | podman-510b5a81dcea7df4c95388db0b66df17a691cb1c.tar.gz podman-510b5a81dcea7df4c95388db0b66df17a691cb1c.tar.bz2 podman-510b5a81dcea7df4c95388db0b66df17a691cb1c.zip |
Merge pull request #2000 from TomSweeneyRedHat/dev/tsweeney/fiximageq
Show image only once with images -q
Diffstat (limited to 'cmd/podman')
-rw-r--r-- | cmd/podman/images.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/podman/images.go b/cmd/podman/images.go index 3351123ed..a1aeb6042 100644 --- a/cmd/podman/images.go +++ b/cmd/podman/images.go @@ -280,7 +280,9 @@ func getImagesTemplateOutput(ctx context.Context, runtime *libpod.Runtime, image if !opts.noTrunc { imageID = shortID(img.ID()) } + // get all specified repo:tag pairs and print them separately + outer: for repo, tags := range image.ReposToMap(img.Names()) { for _, tag := range tags { size, err := img.Size(ctx) @@ -302,6 +304,10 @@ func getImagesTemplateOutput(ctx context.Context, runtime *libpod.Runtime, image Size: sizeStr, } imagesOutput = append(imagesOutput, params) + if opts.quiet { // Show only one image ID when quiet + break outer + } + } } } |