summaryrefslogtreecommitdiff
path: root/cmd/podman/system
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/system')
-rw-r--r--cmd/podman/system/events.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/podman/system/events.go b/cmd/podman/system/events.go
index 6aae62dc0..27e80138e 100644
--- a/cmd/podman/system/events.go
+++ b/cmd/podman/system/events.go
@@ -5,6 +5,7 @@ import (
"context"
"html/template"
"os"
+ "strings"
"github.com/containers/buildah/pkg/formats"
"github.com/containers/libpod/cmd/podman/registry"
@@ -54,6 +55,9 @@ func eventsCmd(cmd *cobra.Command, args []string) error {
eventsError error
tmpl *template.Template
)
+ if strings.Join(strings.Fields(eventFormat), "") == "{{json.}}" {
+ eventFormat = formats.JSONString
+ }
if eventFormat != formats.JSONString {
tmpl, err = template.New("events").Parse(eventFormat)
if err != nil {