Fix cli echoing container ID on start -a|-i
The cli now doesn't echo the container ID when started using either -a or -i. Also fixes `TestStartAttachCorrectExitCode` which incorrectly called start with the result of wait rather than the container ID. Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com> Upstream-commit: eeefa2dc8c45a9be4cfb3a52029e6b46570e5ebe Component: engine
This commit is contained in:
@ -707,12 +707,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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user