User is getting the error message "ERROR console -- (2) Command Line options parse error"
Action Plan
- Check the command to find out if all the parameters passed are correct
-
- Check f there are errors like Missing required option(s) [workingDir] and Some characters of the command line may not be escaped properly. Please refer to your shell documentation. It could be because, Double quotes are not there for workingDir as shown below.
Missing required option(s) [workingDir]
[ERR2] HighlightAutomation --sourceDir C:\Users\ast\source\repos\CastAutomation" --workingDirC:\Users\ast\castoutput" --skipUpload failed with code 2
joptsimple.MissingRequiredOptionsException: Missing required option(s) [workingDir]
at joptsimple.OptionParser.ensureRequiredOptions(OptionParser.java:426)
at joptsimple.OptionParser.parse(OptionParser.java:400)
at com.castsoftware.highlight.CommandLine.run(CommandLine.java:532)
at com.castsoftware.highlight.HighlightAutomation.main(HighlightAutomation.java:24)
Some characters of the command line may not be escaped properly. Please refer to your shell documentation.
Dump of program arguments (separated by newline):
--sourceDir
C:\Users\ xxx \source\repos\CastAutomation" –workingDirC:\Users\ xxx \castoutput" --skipUpload
The working directory should have been "C:\Users\xxx\castoutput" with Double quotes
[main] ERROR console -- (2) Command Line options parse error - The source directory and working directory should be different.
- The command should be run in the directory where the HighlightAutomation.jar is located.
- Check f there are errors like Missing required option(s) [workingDir] and Some characters of the command line may not be escaped properly. Please refer to your shell documentation. It could be because, Double quotes are not there for workingDir as shown below.
-
Ticket
49099, 43100
Related Pages
Highlight Automated Code Scan (Command Line)
CAST HIGHLIGHT - CLI - Error Codes
CAST HIGHLIGHT - CLI - Error code 3 - Command Line techno discovery error
CAST HIGHLIGHT - CLI - Error code 4 - Command Line analysis error
CAST HIGHLIGHT - CLI - Error code 5 - Command Line result upload error
CAST HIGHLIGHT - CLI - Error code 9 - Command Line unziping jars or zip error
CAST HIGHLIGHT - CLI - Docker - Results Upload - Upload failed with code 5 when using Docker
CAST HIGHLIGHT - CLI - ERROR: Failed to fetch company with id when using --basicAuth
Additional Resources
CAST Highlight Troubleshooting Guides
CAST Highlight Product Documentation
Comments