mirror of
https://github.com/docker/compose.git
synced 2026-09-01 23:30:41 +00:00
don't invoke r.Close on error as r == nil
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
de8834d434
commit
87abb4eb9c
1 changed files with 2 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue