Skip to content

Commit c556e24

Browse files
- Added checks message for exception
1 parent 7609d9f commit c556e24

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

src/main/java/com/checkmarx/ast/wrapper/CxWrapper.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -429,22 +429,17 @@ private String checkEngine(String engineName, String osType ) throws CxExceptio
429429
enginePath= Execution.executeCommand((arguments), logger, line->line);
430430
}
431431
catch (CxException e){
432-
throw new CxException(1,"Engine "+engineName+" is not installed on the system");
432+
throw new CxException(1,"Engine "+engineName+" is not installed on the system or not set at location /usr/local/bin");
433433
}
434434

435-
if(!enginePath.startsWith("/usr/local/bin/")){
436-
throw new CxException(1, engineName+ " was found at: " + enginePath + "\n" +
437-
"Please create a symlink at /usr/local/bin/docker:\n\n" +
438-
"sudo ln -s " + enginePath + " /usr/local/bin/"+engineName +"\n");
439-
}
440435
return enginePath;
441436
case OS_WINDOWS:
442437
case OS_LINUX:
443438
arguments.add(engineName);
444439
arguments.add("--version");
445440
try {
446441
Execution.executeCommand(arguments, logger, line -> line);
447-
return engineName; // docker is available via PATH
442+
return engineName;
448443
} catch (CxException | IOException e) {
449444
throw new CxException(
450445
1,engineName+" is not installed or is not accessible from the system PATH."

0 commit comments

Comments
 (0)