Skip to content

Commit

Permalink
Bug fix: wrap nil err (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
knqyf263 committed Sep 25, 2019
1 parent 00f4474 commit f76a052
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion analyzer/analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,10 @@ func GetPackages(filesMap extractor.FileMap) ([]Package, error) {
// Differentiate between a package manager not being found and another error
if err != nil && err == ErrNoPkgsDetected {
continue
} else if err != nil {
return nil, xerrors.Errorf("failed to analyze packages: %w", err)
}
return pkgs, xerrors.Errorf("failed to analyze packages: %w", err)
return pkgs, nil
}
return nil, ErrPkgAnalysis
}
Expand Down

0 comments on commit f76a052

Please sign in to comment.