diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2018-01-04 08:53:46 -0500 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-01-04 21:05:10 +0000 |
commit | b231e3412e7d37d9680229e3782e28161792c7f8 (patch) | |
tree | da0d214d45bbb13b3254dfe450b73ddc24e44351 /cmd/podman/start.go | |
parent | 137e5c8ffd5e1d7abe47398d909c9611f19bfcbb (diff) | |
download | podman-b231e3412e7d37d9680229e3782e28161792c7f8.tar.gz podman-b231e3412e7d37d9680229e3782e28161792c7f8.tar.bz2 podman-b231e3412e7d37d9680229e3782e28161792c7f8.zip |
Fix handling of exit codes
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Closes: #183
Approved by: TomSweeneyRedHat
Diffstat (limited to 'cmd/podman/start.go')
-rw-r--r-- | cmd/podman/start.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/podman/start.go b/cmd/podman/start.go index 33bc354bb..d4ddfbbe7 100644 --- a/cmd/podman/start.go +++ b/cmd/podman/start.go @@ -126,6 +126,11 @@ func startCmd(c *cli.Context) error { fmt.Println(ctr.ID()) } wg.Wait() + if ecode, err := ctr.ExitCode(); err != nil { + logrus.Errorf("unable to get exit code of container %s: %q", ctr.ID(), err) + } else { + exitCode = int(ecode) + } } return lastError } |