summaryrefslogtreecommitdiff
path: root/cmd/podman/version.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/version.go')
-rw-r--r--cmd/podman/version.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/podman/version.go b/cmd/podman/version.go
index 336be892e..31b0b8e82 100644
--- a/cmd/podman/version.go
+++ b/cmd/podman/version.go
@@ -3,6 +3,7 @@ package main
import (
"fmt"
"os"
+ "strings"
"text/tabwriter"
"time"
@@ -43,6 +44,9 @@ func versionCmd(c *cliconfig.VersionValues) error {
versionOutputFormat := c.Format
if versionOutputFormat != "" {
+ if strings.Join(strings.Fields(versionOutputFormat), "") == "{{json.}}" {
+ versionOutputFormat = formats.JSONString
+ }
var out formats.Writer
switch versionOutputFormat {
case formats.JSONString: