mirror of https://github.com/docker/compose.git
Merge pull request #1630 from ndeloof/logs_panic
don't invoke r.Close on error as r == nil
This commit is contained in:
commit
2c79e63b83
|
@ -51,11 +51,11 @@ func (s *composeService) Logs(ctx context.Context, projectName string, consumer
|
|||
Tail: options.Tail,
|
||||
Timestamps: options.Timestamps,
|
||||
})
|
||||
defer r.Close() // nolint errcheck
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer r.Close() // nolint errcheck
|
||||
|
||||
name := getContainerNameWithoutProject(c)
|
||||
w := utils.GetWriter(name, service, func(event compose.ContainerEvent) {
|
||||
consumer.Log(name, service, event.Line)
|
||||
|
|
Loading…
Reference in New Issue