run: cleanup – remove errCh
nil check
Now, if running in "detached" mode, we early exit at L222. Similarly, if `attachContainer` errors out, it returns an error that gets handled on L190. As such, `errCh` can never be nil on L231. Remove the nil check. Signed-off-by: Laura Brehm <laurabrehm@hey.com>
This commit is contained in:
parent
446f36ce58
commit
a3d9fc4941
@ -228,16 +228,14 @@ func runContainer(ctx context.Context, dockerCli command.Cli, runOpts *runOption
|
||||
}
|
||||
}
|
||||
|
||||
if errCh != nil {
|
||||
if err := <-errCh; err != nil {
|
||||
if _, ok := err.(term.EscapeError); ok {
|
||||
// The user entered the detach escape sequence.
|
||||
return nil
|
||||
}
|
||||
|
||||
logrus.Debugf("Error hijack: %s", err)
|
||||
return err
|
||||
if err := <-errCh; err != nil {
|
||||
if _, ok := err.(term.EscapeError); ok {
|
||||
// The user entered the detach escape sequence.
|
||||
return nil
|
||||
}
|
||||
|
||||
logrus.Debugf("Error hijack: %s", err)
|
||||
return err
|
||||
}
|
||||
|
||||
status := <-statusChan
|
||||
|
Loading…
x
Reference in New Issue
Block a user