summaryrefslogtreecommitdiff
path: root/cmd/podman/inspect.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/inspect.go')
-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 {