diff --git a/scan/base.go b/scan/base.go index e61b6596..bd56ac1f 100644 --- a/scan/base.go +++ b/scan/base.go @@ -555,7 +555,7 @@ func (l *base) scanLibraries() (err error) { // find / -name "*package-lock.json" -o -name "*yarn.lock" ... 2>&1 | grep -v "Permission denied" cmd := fmt.Sprintf(`find / ` + findopt[:len(findopt)-3] + ` 2>&1 | grep -v "Permission denied"`) r := exec(l.ServerInfo, cmd, noSudo) - if !r.isSuccess() { + if r.ExitStatus != 0 && r.ExitStatus != 1 { return xerrors.Errorf("Failed to find lock files") } detectFiles = append(detectFiles, strings.Split(r.Stdout, "\n")...)