Search in sources :

Example 1 with ExecutablesNotFoundDetectableResult

use of com.synopsys.integration.detectable.detectable.result.ExecutablesNotFoundDetectableResult in project synopsys-detect by blackducksoftware.

the class DartPubDepDetectable method extractable.

@Override
public DetectableResult extractable() throws DetectableException {
    if (!pubspecLock.isPresent() && pubspecYaml.isPresent()) {
        return new PubSpecLockNotFoundDetectableResult(environment.getDirectory().getAbsolutePath());
    } else if (pubspecLock.isPresent() && !pubspecYaml.isPresent()) {
        return new FileNotFoundDetectableResult(PUBSPEC_LOCK_FILENAME);
    }
    dartExe = dartResolver.resolveDart();
    flutterExe = flutterResolver.resolveFlutter();
    if (dartExe == null && flutterExe == null) {
        return new ExecutablesNotFoundDetectableResult(Arrays.asList("dart", "flutter"));
    }
    return new PassedDetectableResult();
}
Also used : ExecutablesNotFoundDetectableResult(com.synopsys.integration.detectable.detectable.result.ExecutablesNotFoundDetectableResult) FileNotFoundDetectableResult(com.synopsys.integration.detectable.detectable.result.FileNotFoundDetectableResult) PubSpecLockNotFoundDetectableResult(com.synopsys.integration.detectable.detectable.result.PubSpecLockNotFoundDetectableResult) PassedDetectableResult(com.synopsys.integration.detectable.detectable.result.PassedDetectableResult)

Aggregations

ExecutablesNotFoundDetectableResult (com.synopsys.integration.detectable.detectable.result.ExecutablesNotFoundDetectableResult)1 FileNotFoundDetectableResult (com.synopsys.integration.detectable.detectable.result.FileNotFoundDetectableResult)1 PassedDetectableResult (com.synopsys.integration.detectable.detectable.result.PassedDetectableResult)1 PubSpecLockNotFoundDetectableResult (com.synopsys.integration.detectable.detectable.result.PubSpecLockNotFoundDetectableResult)1