container start wrong error check

noticed that when checking for if the user has entered the escape sequence
after starting the container, the code was checking that the error from
inspect was a term.EscapeError rather than the error from attach in order to
mask the error returned to a nil one - I think this is the error that was
intended to be checked here.

Signed-off-by: Reed Allman <reed@rdallman.com>
This commit is contained in:
Reed Allman 2019-05-24 19:03:48 -07:00
parent c02f389c78
commit 34b6ee10a1
1 changed files with 1 additions and 1 deletions

View File

@ -154,7 +154,7 @@ func runStart(dockerCli command.Cli, opts *startOptions) error {
} }
} }
if attachErr := <-cErr; attachErr != nil { if attachErr := <-cErr; attachErr != nil {
if _, ok := err.(term.EscapeError); ok { if _, ok := attachErr.(term.EscapeError); ok {
// The user entered the detach escape sequence. // The user entered the detach escape sequence.
return nil return nil
} }