summaryrefslogtreecommitdiff
path: root/cmd/podman/inspect/inspect.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-12-02 19:28:48 +0100
committerGitHub <noreply@github.com>2021-12-02 19:28:48 +0100
commit4ff0ba4c8731e3dc1d56010f80468260104f3abc (patch)
tree897ede56e699e7f39ad5aa949851bf7fd11ea3c3 /cmd/podman/inspect/inspect.go
parentee39281c35e3ceca98c0c51c9cc5d792c56ba533 (diff)
parent61792de36ea2ea98f6e3aef3821d1b15beebf9e0 (diff)
downloadpodman-4ff0ba4c8731e3dc1d56010f80468260104f3abc.tar.gz
podman-4ff0ba4c8731e3dc1d56010f80468260104f3abc.tar.bz2
podman-4ff0ba4c8731e3dc1d56010f80468260104f3abc.zip
Merge pull request #12455 from jwhonce/issues/10974
Refactor podman image command output
Diffstat (limited to 'cmd/podman/inspect/inspect.go')
-rw-r--r--cmd/podman/inspect/inspect.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/podman/inspect/inspect.go b/cmd/podman/inspect/inspect.go
index 64b586388..c982b1b7f 100644
--- a/cmd/podman/inspect/inspect.go
+++ b/cmd/podman/inspect/inspect.go
@@ -215,8 +215,10 @@ func (i *inspector) inspect(namesOrIDs []string) error {
case report.IsJSON(i.options.Format) || i.options.Format == "":
err = printJSON(data)
default:
+ // Landing here implies user has given a custom --format
row := inspectNormalize(i.options.Format)
- row = "{{range . }}" + report.NormalizeFormat(row) + "{{end -}}"
+ row = report.NormalizeFormat(row)
+ row = report.EnforceRange(row)
err = printTmpl(tmpType, row, data)
}
if err != nil {