mirror of
https://github.com/ossf/scorecard.git
synced 2024-11-10 02:16:26 +03:00
Fix nil ptr dereference (#907)
Co-authored-by: Azeem Shaikh <azeems@google.com> Co-authored-by: Naveen <172697+naveensrinivasan@users.noreply.github.com>
This commit is contained in:
parent
cc30d54db2
commit
e73f08e76c
@ -86,13 +86,15 @@ func (handler *tarballHandler) init(ctx context.Context, repo *github.Repository
|
||||
}
|
||||
|
||||
// Extract file names and content from tarball.
|
||||
err := handler.extractTarball()
|
||||
if errors.Is(err, errTarballCorrupted) {
|
||||
if err := handler.extractTarball(); errors.Is(err, errTarballCorrupted) {
|
||||
log.Printf("unable to extract tarball %v. Skipping...", err)
|
||||
return nil
|
||||
} else if err != nil {
|
||||
// nolint: wrapcheck
|
||||
return sce.Create(sce.ErrScorecardInternal, err.Error())
|
||||
}
|
||||
// nolint: wrapcheck
|
||||
return sce.Create(sce.ErrScorecardInternal, err.Error())
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (handler *tarballHandler) getTarball(ctx context.Context, repo *github.Repository) error {
|
||||
|
Loading…
Reference in New Issue
Block a user