diff options
Diffstat (limited to 'cmd/podman/images')
-rw-r--r-- | cmd/podman/images/list.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cmd/podman/images/list.go b/cmd/podman/images/list.go index 236ae15b4..4a9df5712 100644 --- a/cmd/podman/images/list.go +++ b/cmd/podman/images/list.go @@ -141,8 +141,12 @@ func writeJSON(imageS []*entities.ImageSummary) error { imgs = append(imgs, h) } - enc := json.NewEncoder(os.Stdout) - return enc.Encode(imgs) + prettyJSON, err := json.MarshalIndent(imgs, "", " ") + if err != nil { + return err + } + fmt.Println(string(prettyJSON)) + return nil } func writeTemplate(imageS []*entities.ImageSummary) error { |