Run signature scanner for npm if bdio is generated
@@ -131,6 +131,10 @@ class NpmBomTool extends BomTool {
codeLocations.addAll(extractFromLockFile(shrinkwrapJson))
}
+ if (!codeLocations.empty) {
+ hubSignatureScanner.registerPathToScan(sourceDirectory, NODE_MODULES)
+ }
+
codeLocations
}
@@ -159,7 +163,6 @@ class NpmBomTool extends BomTool {
}
def detectCodeLocation = npmCliDependencyFinder.generateCodeLocation(sourcePath, npmLsOutputFile)
- hubSignatureScanner.registerPathToScan(sourceDirectory, NODE_MODULES)
return [detectCodeLocation]
} else if (npmLsErrorFile.length() > 0) {
logger.error("Error when running npm ls -json command\n${npmLsErrorFile.text}")
