summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-06-25 00:20:25 +0200
committerGitHub <noreply@github.com>2019-06-25 00:20:25 +0200
commitd8b18a98791a49f5352d6a849cef7bff136cbb2c (patch)
tree21fc7842615b30a5c6bc9cd031a7476b7a3ef313 /cmd/podman
parent394e12aa656ed3d9cc0afef48f1315fff5ed5db3 (diff)
parent2d9f1e95eb00242751ff0d9655bb513c27173475 (diff)
downloadpodman-d8b18a98791a49f5352d6a849cef7bff136cbb2c.tar.gz
podman-d8b18a98791a49f5352d6a849cef7bff136cbb2c.tar.bz2
podman-d8b18a98791a49f5352d6a849cef7bff136cbb2c.zip
Merge pull request #3401 from mheon/templating_is_dumb
Fix inspect --format '{{.Mounts}}.
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/inspect.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmd/podman/inspect.go b/cmd/podman/inspect.go
index 4303c149c..24edfcb68 100644
--- a/cmd/podman/inspect.go
+++ b/cmd/podman/inspect.go
@@ -98,6 +98,14 @@ func inspectCmd(c *cliconfig.InspectValues) error {
if strings.Contains(outputFormat, "{{.Id}}") {
outputFormat = strings.Replace(outputFormat, "{{.Id}}", formats.IDString, -1)
}
+ // These fields were renamed, so we need to provide backward compat for
+ // the old names.
+ if strings.Contains(outputFormat, ".Src") {
+ outputFormat = strings.Replace(outputFormat, ".Src", ".Source", -1)
+ }
+ if strings.Contains(outputFormat, ".Dst") {
+ outputFormat = strings.Replace(outputFormat, ".Dst", ".Destination", -1)
+ }
if latestContainer {
lc, err := runtime.GetLatestContainer()
if err != nil {