Skip to content

Commit

Permalink
fix nil deref in source init
Browse files Browse the repository at this point in the history
  • Loading branch information
dogancanbakir committed Sep 26, 2024
1 parent 6537b32 commit 8853e10
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions v2/pkg/passive/sources.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ func New(sourceNames, excludedSourceNames []string, useAllSources, useSourcesSup
}
}

if len(sources) == 0 {
gologger.Fatal().Msg("No sources selected for this search")
}

gologger.Debug().Msgf("Selected source(s) for this search: %s", strings.Join(maps.Keys(sources), ", "))

for _, currentSource := range sources {
Expand Down

0 comments on commit 8853e10

Please sign in to comment.