Search in sources :

Example 1 with NpmRunInstallDetectorResult

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();
}
Also used : PassedDetectorResult(com.blackducksoftware.integration.hub.detect.workflow.search.result.PassedDetectorResult) NpmRunInstallDetectorResult(com.blackducksoftware.integration.hub.detect.workflow.search.result.NpmRunInstallDetectorResult) ExecutableNotFoundDetectorResult(com.blackducksoftware.integration.hub.detect.workflow.search.result.ExecutableNotFoundDetectorResult) File(java.io.File)

Aggregations

ExecutableNotFoundDetectorResult (com.blackducksoftware.integration.hub.detect.workflow.search.result.ExecutableNotFoundDetectorResult)1 NpmRunInstallDetectorResult (com.blackducksoftware.integration.hub.detect.workflow.search.result.NpmRunInstallDetectorResult)1 PassedDetectorResult (com.blackducksoftware.integration.hub.detect.workflow.search.result.PassedDetectorResult)1 File (java.io.File)1