summaryrefslogtreecommitdiff
path: root/cmd/podman/tree.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/tree.go')
-rw-r--r--cmd/podman/tree.go6
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.