diff options
Diffstat (limited to 'cmd/podman/pod_start.go')
-rw-r--r-- | cmd/podman/pod_start.go | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/cmd/podman/pod_start.go b/cmd/podman/pod_start.go index 1e82bc0ee..75681a747 100644 --- a/cmd/podman/pod_start.go +++ b/cmd/podman/pod_start.go @@ -78,13 +78,7 @@ func podStartCmd(c *cli.Context) error { ctx := getContext() for _, pod := range pods { ctr_errs, err := pod.Start(ctx) - if err != nil { - if lastError != nil { - logrus.Errorf("%q", lastError) - } - lastError = errors.Wrapf(err, "unable to start pod %q", pod.ID()) - continue - } else if ctr_errs != nil { + if ctr_errs != nil { for ctr, err := range ctr_errs { if lastError != nil { logrus.Errorf("%q", lastError) @@ -93,6 +87,13 @@ func podStartCmd(c *cli.Context) error { } continue } + if err != nil { + if lastError != nil { + logrus.Errorf("%q", lastError) + } + lastError = errors.Wrapf(err, "unable to start pod %q", pod.ID()) + continue + } fmt.Println(pod.ID()) } |