diff --git a/pkg/sources/source_manager.go b/pkg/sources/source_manager.go index f78d30b09dc1..890099478d40 100644 --- a/pkg/sources/source_manager.go +++ b/pkg/sources/source_manager.go @@ -256,6 +256,8 @@ func (s *SourceManager) runWithUnits(ctx context.Context, handle handle, source unitCh: make(chan SourceUnit), report: report, } + // Create a function that will save the first error encountered (if + // any) and discard the rest. fatalErr := make(chan error, 1) catchFirstFatal := func(err error) { select {