aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman/containers/start.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/containers/start.go')
-rw-r--r--cmd/podman/containers/start.go19
1 files changed, 9 insertions, 10 deletions
diff --git a/cmd/podman/containers/start.go b/cmd/podman/containers/start.go
index fc3488e0c..061f0953d 100644
--- a/cmd/podman/containers/start.go
+++ b/cmd/podman/containers/start.go
@@ -137,19 +137,18 @@ func start(cmd *cobra.Command, args []string) error {
if err != nil {
return err
}
-
for _, r := range responses {
- if r.Err == nil {
- if startOptions.Attach {
- // Implement the exitcode when the only one container is enabled attach
- registry.SetExitCode(r.ExitCode)
- } else {
- fmt.Println(r.RawInput)
- }
- } else {
+ switch {
+ case r.Err != nil:
errs = append(errs, r.Err)
+ case startOptions.Attach:
+ // Implement the exitcode when the only one container is enabled attach
+ registry.SetExitCode(r.ExitCode)
+ case r.RawInput != "":
+ fmt.Println(r.RawInput)
+ default:
+ fmt.Println(r.Id)
}
}
-
return errs.PrintErrors()
}