From 61792de36ea2ea98f6e3aef3821d1b15beebf9e0 Mon Sep 17 00:00:00 2001 From: Jhon Honce Date: Thu, 18 Nov 2021 09:03:00 -0700 Subject: Refactor podman image command output Leverage new report.Formatter allowing better compatibility from podman command output. Follow on PR's will cover containers, etc. See #10974 Signed-off-by: Jhon Honce --- cmd/podman/secrets/list.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cmd/podman/secrets/list.go') diff --git a/cmd/podman/secrets/list.go b/cmd/podman/secrets/list.go index f136de4ab..255d9ae1a 100644 --- a/cmd/podman/secrets/list.go +++ b/cmd/podman/secrets/list.go @@ -71,7 +71,10 @@ func outputTemplate(cmd *cobra.Command, responses []*entities.SecretListReport) "UpdatedAt": "UPDATED", }) - row := report.NormalizeFormat(listFlag.format) + row := cmd.Flag("format").Value.String() + if cmd.Flags().Changed("format") { + row = report.NormalizeFormat(row) + } format := report.EnforceRange(row) tmpl, err := report.NewTemplate("list").Parse(format) -- cgit v1.2.3-54-g00ecf