diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-06-28 19:14:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-28 19:14:45 +0200 |
commit | ed394070a895654ad3ffbabd81a3033b0c7088ff (patch) | |
tree | 5bc19d3d8e0af29b957bf475832a9ba6e8225665 /cmd/podman | |
parent | 9d49bda8f1346e0c92adc28e7066f8d8f9e6493b (diff) | |
parent | 1ebb84b58eb3531cd22a49a4d0ce497b9b356d90 (diff) | |
download | podman-ed394070a895654ad3ffbabd81a3033b0c7088ff.tar.gz podman-ed394070a895654ad3ffbabd81a3033b0c7088ff.tar.bz2 podman-ed394070a895654ad3ffbabd81a3033b0c7088ff.zip |
Merge pull request #3422 from nalind/no-layer-images
Handle images which contain no layers
Diffstat (limited to 'cmd/podman')
-rw-r--r-- | cmd/podman/tree.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd/podman/tree.go b/cmd/podman/tree.go index 6490c609d..0f62858e8 100644 --- a/cmd/podman/tree.go +++ b/cmd/podman/tree.go @@ -72,7 +72,11 @@ func printTree(imageInfo *image.InfoImage, layerInfoMap map[string]*image.LayerI fmt.Printf("Image ID: %s\n", imageInfo.ID[:12]) fmt.Printf("Tags:\t %s\n", imageInfo.Tags) fmt.Printf("Size:\t %v\n", units.HumanSizeWithPrecision(float64(*size), 4)) - fmt.Printf(fmt.Sprintf("Image Layers\n")) + if img.TopLayer() != "" { + fmt.Printf("Image Layers\n") + } else { + fmt.Printf("No Image Layers\n") + } if !whatRequires { // fill imageInfo with layers associated with image. |