Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.4
-
None
-
None
Description
When processing option value which starts with hyphen/dash like -sec-attr -password1 , exception [1] occurs. If the current token start with dash, it will be processed as an option and therefore this will not be set as a value to the previous option, which will cause [1]. The only way to set such value is to use equals sign like -sec-attr=-password1. In this case the whole token is processed as option=value pair and the correct value will be set.
[1]
org.apache.commons.cli.MissingArgumentException: Missing argument for option: xorg.apache.commons.cli.MissingArgumentException: Missing argument for option: x at org.apache.commons.cli.DefaultParser.checkRequiredArgs(DefaultParser.java:259) at org.apache.commons.cli.DefaultParser.handleOption(DefaultParser.java:669) at org.apache.commons.cli.DefaultParser.handleConcatenatedOptions(DefaultParser.java:773) at org.apache.commons.cli.DefaultParser.handleShortAndLongOption(DefaultParser.java:590) at org.apache.commons.cli.DefaultParser.handleToken(DefaultParser.java:291) at org.apache.commons.cli.DefaultParser.parse(DefaultParser.java:168) at org.apache.commons.cli.DefaultParser.parse(DefaultParser.java:129)
Attachments
Issue Links
- is caused by
-
CLI-265 Optional argument picking up next regular option as its argument
- Closed