fix: fixed handling of given zip file non-existent
@@ -47,7 +47,8 @@ public class OnlineProjectInspectorResolver implements com.synopsys.integration.
} catch (DetectableException e) {
logger.debug("Unable to install the project inspector.");
}
- if ((projectInspectorExeFile == null) && (projectInspectorInstaller.shouldFallbackToPreviousInstall())) {
+ if ((projectInspectorExeFile == null)) {
+ if (projectInspectorInstaller.shouldFallbackToPreviousInstall()) {
// Installation has failed, and we should fall back to previous installation
logger.debug("Attempting to locate previous install of project inspector.");
return installedToolLocator.locateTool(INSTALLED_TOOL_JSON_KEY)
@@ -55,6 +56,9 @@ public class OnlineProjectInspectorResolver implements com.synopsys.integration.
.orElseThrow(() ->
new DetectableException("Unable to locate previous install of the project inspector.")
);
+ } else {
+ throw new DetectableException("Unable to locate given project inspector zip file.");
+ }
} else {
installedToolManager.saveInstalledToolLocation(INSTALLED_TOOL_JSON_KEY, projectInspectorExeFile.getAbsolutePath());
}
