use of com.blackducksoftware.integration.hub.detect.workflow.search.result.NpmRunInstallDetectorResult in project hub-detect by blackducksoftware.
the class NpmCliDetector method extractable.
@Override
public DetectorResult extractable() throws DetectorException {
final File nodeModules = fileFinder.findFile(environment.getDirectory(), NODE_MODULES);
if (nodeModules == null) {
return new NpmRunInstallDetectorResult(environment.getDirectory().getAbsolutePath());
}
npmExe = npmExecutableFinder.findNpm(environment);
if (npmExe == null) {
return new ExecutableNotFoundDetectorResult("npm");
}
return new PassedDetectorResult();
}
Aggregations