Don't follow if there is an error

This commit is contained in:
Dane Everitt 2020-12-25 17:09:35 -08:00
parent 94d41bc1f5
commit 1ba3631cc1
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53

View File

@ -292,7 +292,9 @@ func (e *Environment) followOutput() error {
}
reader, err := e.client.ContainerLogs(context.Background(), e.Id, opts)
if err != nil {
return err
}
go func(reader io.ReadCloser) {
defer reader.Close()
evts := e.Events()
@ -303,8 +305,7 @@ func (e *Environment) followOutput() error {
log.WithField("error", err).WithField("container_id", e.Id).Warn("error processing scanner line in console output")
}
}(reader)
return err
return nil
}
// Pulls the image from Docker. If there is an error while pulling the image from the source