summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/port.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmd/podman/port.go b/cmd/podman/port.go
index d6497d450..3355e751b 100644
--- a/cmd/podman/port.go
+++ b/cmd/podman/port.go
@@ -104,6 +104,9 @@ func portCmd(c *cli.Context) error {
containers = append(containers, container)
} else if c.Bool("latest") {
container, err = runtime.GetLatestContainer()
+ if err != nil {
+ return errors.Wrapf(err, "unable to get last created container")
+ }
containers = append(containers, container)
} else {
containers, err = runtime.GetRunningContainers()