summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2022-01-11 10:21:39 -0500
committerGitHub <noreply@github.com>2022-01-11 10:21:39 -0500
commite4c613e4204c19969e777ca9753750b45d4f0e5f (patch)
tree193f1deba9bbca4c907a600b3e9196cb7c8741fe /cmd
parented9ef59e7ea439b670875863132b68fd094501c7 (diff)
parentc085fb3c9792df9d6756eb4995c428dfd4813a60 (diff)
downloadpodman-e4c613e4204c19969e777ca9753750b45d4f0e5f.tar.gz
podman-e4c613e4204c19969e777ca9753750b45d4f0e5f.tar.bz2
podman-e4c613e4204c19969e777ca9753750b45d4f0e5f.zip
Merge pull request #12805 from rhatdan/machine
Pretty Print output of podman machine ls --format json
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/machine/list.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/podman/machine/list.go b/cmd/podman/machine/list.go
index 858d87401..ed43b42df 100644
--- a/cmd/podman/machine/list.go
+++ b/cmd/podman/machine/list.go
@@ -32,6 +32,7 @@ var (
Args: validate.NoArgs,
ValidArgsFunction: completion.AutocompleteNone,
Example: `podman machine list,
+ podman machine list --format json
podman machine ls`,
}
listFlag = listFlagType{}
@@ -96,7 +97,7 @@ func list(cmd *cobra.Command, args []string) error {
return err
}
- b, err := json.Marshal(machineReporter)
+ b, err := json.MarshalIndent(machineReporter, "", " ")
if err != nil {
return err
}