summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2022-09-06 13:53:35 +0200
committerPaul Holzinger <pholzing@redhat.com>2022-09-06 13:56:26 +0200
commitd22aeeec28843e1d8a5834bffb63e0d82267e4ba (patch)
tree0056bb291e2111d77afaef6d7c6a50924dae7197 /cmd
parent098c0714e5c2c461c175753eef3dc9d900699be5 (diff)
downloadpodman-d22aeeec28843e1d8a5834bffb63e0d82267e4ba.tar.gz
podman-d22aeeec28843e1d8a5834bffb63e0d82267e4ba.tar.bz2
podman-d22aeeec28843e1d8a5834bffb63e0d82267e4ba.zip
fix podman events with custom format
podman events --format {{.ID}} was not working since the template was converted to a range but we only render each event individually. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/system/events.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/podman/system/events.go b/cmd/podman/system/events.go
index b04668f86..3c6a35e83 100644
--- a/cmd/podman/system/events.go
+++ b/cmd/podman/system/events.go
@@ -85,7 +85,9 @@ func eventsCmd(cmd *cobra.Command, _ []string) error {
doJSON = report.IsJSON(eventFormat)
if !doJSON {
var err error
- rpt, err = report.New(os.Stdout, cmd.Name()).Parse(report.OriginUser, eventFormat)
+ // Use OriginUnknown so it does not add an extra range since it
+ // will only be called for each single element and not a slice.
+ rpt, err = report.New(os.Stdout, cmd.Name()).Parse(report.OriginUnknown, eventFormat)
if err != nil {
return err
}