mirror of https://github.com/docker/compose.git
Merge pull request #1047 from docker/fix-stdin-nil
Check if stdin is nil before closing
This commit is contained in:
commit
817ecaabaa
|
@ -80,7 +80,9 @@ func (s *composeService) attachContainerStreams(ctx context.Context, container m
|
|||
go func() {
|
||||
<-ctx.Done()
|
||||
stdout.Close() //nolint:errcheck
|
||||
stdin.Close() //nolint:errcheck
|
||||
if stdin != nil {
|
||||
stdin.Close() //nolint:errcheck
|
||||
}
|
||||
}()
|
||||
|
||||
if r != nil && stdin != nil {
|
||||
|
|
Loading…
Reference in New Issue