mirror of
https://github.com/anchore/syft.git
synced 2026-11-05 08:56:41 +01:00
fix: reduce warn levels to debug for non-actionable errors (#3645)
Signed-off-by: Keith Zantow <kzantow@gmail.com>
This commit is contained in:
@@ -80,7 +80,7 @@ func defaultGoModDir() string {
|
||||
if goPath == "" {
|
||||
homeDir, err := homedir.Dir()
|
||||
if err != nil {
|
||||
log.Warnf("unable to determine GOPATH or user home dir: %w", err)
|
||||
log.Debugf("unable to determine GOPATH or user home dir: %w", err)
|
||||
return ""
|
||||
}
|
||||
goPath = filepath.Join(homeDir, "go")
|
||||
|
||||
@@ -60,7 +60,7 @@ func newGoLicenseResolver(catalogerName string, opts CatalogerConfig) goLicenseR
|
||||
if vendorDir == "" {
|
||||
wd, err := os.Getwd()
|
||||
if err != nil {
|
||||
log.Warn("unable to get CWD while resolving the local go vendor dir: %v", err)
|
||||
log.Debug("unable to get CWD while resolving the local go vendor dir: %v", err)
|
||||
} else {
|
||||
vendorDir = filepath.Join(wd, "vendor")
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ func scanFile(location file.Location, reader unionreader.UnionReader) ([]*extend
|
||||
// with more than one binary
|
||||
readers, errs := unionreader.GetReaders(reader)
|
||||
if errs != nil {
|
||||
log.WithFields("error", errs).Warnf("failed to open a golang binary")
|
||||
log.WithFields("error", errs).Debug("failed to open a golang binary")
|
||||
return nil, fmt.Errorf("failed to open a golang binary: %w", errs)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user