feat(library) output library type when err (#1460)

This commit is contained in:
sadayuki-matsuno
2022-05-16 09:58:58 +09:00
committed by GitHub
parent 2158fc6cb1
commit 1c1e40058e

View File

@@ -61,7 +61,7 @@ type Library struct {
func (s LibraryScanner) Scan() ([]VulnInfo, error) {
scanner, err := library.NewDriver(s.Type)
if err != nil {
return nil, xerrors.Errorf("Failed to new a library driver: %w", err)
return nil, xerrors.Errorf("Failed to new a library driver %s: %w", s.Type, err)
}
var vulnerabilities = []VulnInfo{}
for _, pkg := range s.Libs {