Skip to content

Commit

Permalink
Initialize scan options if given a nil pointer (#924)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcastorina committed Nov 15, 2022
1 parent 696f5c6 commit 86f9e12
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/sources/git/git.go
Expand Up @@ -540,6 +540,9 @@ func (s *Git) ScanUnstaged(ctx context.Context, repo *git.Repository, path strin
}

func (s *Git) ScanRepo(ctx context.Context, repo *git.Repository, repoPath string, scanOptions *ScanOptions, chunksChan chan *sources.Chunk) error {
if scanOptions == nil {
scanOptions = NewScanOptions()
}
if err := normalizeConfig(scanOptions, repo); err != nil {
return err
}
Expand Down

0 comments on commit 86f9e12

Please sign in to comment.