Search in sources :

Example 1 with ExecutableNotFoundDetectorResult

use of com.blackducksoftware.integration.hub.detect.workflow.search.result.ExecutableNotFoundDetectorResult in project hub-detect by blackducksoftware.

the class CpanCliDetector method extractable.

@Override
public DetectorResult extractable() throws DetectorException {
    final File cpan = cacheableExecutableFinder.getExecutable(CacheableExecutableType.CPAN);
    if (cpan == null) {
        return new ExecutableNotFoundDetectorResult("cpan");
    } else {
        cpanExe = cpan;
    }
    final File cpanm = cacheableExecutableFinder.getExecutable(CacheableExecutableType.CPANM);
    if (cpanm == null) {
        return new ExecutableNotFoundDetectorResult("cpanm");
    } else {
        cpanmExe = cpanm;
    }
    return new PassedDetectorResult();
}
Also used : PassedDetectorResult(com.blackducksoftware.integration.hub.detect.workflow.search.result.PassedDetectorResult) ExecutableNotFoundDetectorResult(com.blackducksoftware.integration.hub.detect.workflow.search.result.ExecutableNotFoundDetectorResult) File(java.io.File)

Example 2 with ExecutableNotFoundDetectorResult

use of com.blackducksoftware.integration.hub.detect.workflow.search.result.ExecutableNotFoundDetectorResult 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)2 PassedDetectorResult (com.blackducksoftware.integration.hub.detect.workflow.search.result.PassedDetectorResult)2 File (java.io.File)2 NpmRunInstallDetectorResult (com.blackducksoftware.integration.hub.detect.workflow.search.result.NpmRunInstallDetectorResult)1