summaryrefslogtreecommitdiff
path: root/cmd/podman/system/info.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/system/info.go')
-rw-r--r--cmd/podman/system/info.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd/podman/system/info.go b/cmd/podman/system/info.go
index c3f543e6a..c323ee276 100644
--- a/cmd/podman/system/info.go
+++ b/cmd/podman/system/info.go
@@ -3,6 +3,7 @@ package system
import (
"fmt"
"os"
+ "text/template"
"github.com/containers/common/pkg/completion"
"github.com/containers/common/pkg/report"
@@ -84,7 +85,10 @@ func info(cmd *cobra.Command, args []string) error {
}
fmt.Println(string(b))
case cmd.Flags().Changed("format"):
- tmpl, err := report.NewTemplate("info").Parse(inFormat)
+ // Cannot use report.New() as it enforces {{range .}} for OriginUser templates
+ tmpl := template.New(cmd.Name()).Funcs(template.FuncMap(report.DefaultFuncs))
+ inFormat = report.NormalizeFormat(inFormat)
+ tmpl, err := tmpl.Parse(inFormat)
if err != nil {
return err
}