Merge pull request #9936 from icecrime/noecho_start_attached

Fix cli echoing container ID on start -a|-i
This commit is contained in:
Jessie Frazelle
2015-01-06 19:07:40 -08:00
2 changed files with 32 additions and 4 deletions
+2 -2
View File
@@ -747,12 +747,12 @@ func (cli *DockerCli) CmdStart(args ...string) error {
for _, name := range cmd.Args() {
_, _, err := readBody(cli.call("POST", "/containers/"+name+"/start", nil, false))
if err != nil {
if !*attach || !*openStdin {
if !*attach && !*openStdin {
fmt.Fprintf(cli.err, "%s\n", err)
}
encounteredError = fmt.Errorf("Error: failed to start one or more containers")
} else {
if !*attach || !*openStdin {
if !*attach && !*openStdin {
fmt.Fprintf(cli.out, "%s\n", name)
}
}