diff --git a/commands.go b/commands.go index 3324d75754..236fb65d10 100644 --- a/commands.go +++ b/commands.go @@ -584,15 +584,17 @@ func (cli *DockerCli) CmdStart(args ...string) error { return nil } + var encounteredError error for _, name := range args { _, _, err := cli.call("POST", "/containers/"+name+"/start", nil) if err != nil { fmt.Fprintf(cli.err, "%s\n", err) + encounteredError = fmt.Errorf("Error: failed to start one or more containers") } else { fmt.Fprintf(cli.out, "%s\n", name) } } - return nil + return encounteredError } func (cli *DockerCli) CmdInspect(args ...string) error {