The following error is seen when running the CLI agent using Azure.
Error: Unable to access jarfile /home/vsts/work/_tasks/highlightcodescan_d09a7949-d043-4058-b56c-103b0da04686/5.1.260\HighlightAutomation.jar
exec error: Error: Command failed: java -jar "/home/vsts/work/_tasks/highlightcodescan_d09a7949-d043-4058-b56c-103b0da04686/5.1.260\HighlightAutomation.jar" --perlInstallDir "/usr/bin/perl" --analyzerDir "/home/vsts/work/_tasks/highlightcodescan_d09a7949-d043-4058-b56c-103b0da04686/5.1.260/perl" --workingDir "/App" --sourceDir "/App" --technologies "Python" --basicAuth "undefined" --companyId undefined --applicationId undefined --serverUrl "undefined" --snapshotLabel "manuellopez-carralero master 71"
Error: Unable to access jarfile /home/vsts/work/_tasks/highlightcodescan_d09a7949-d043-4058-b56c-103b0da04686/5.1.260\HighlightAutomation.jar
Finishing: CAST Highlight Code Scan
Solution
The issue was due to the difference in the file systems used in Windows and Linux machines. Windows uses a backward slash (\) while linux uses the forward slash (/).
The following change was made on the 67th line of the file index.js (found under work folder), to make sure that the CLI works in both the Windows and Linux machines.
Zendesk Ticket Number
23932
Comments