Bugfix in LightOptionParser when handling undefined options.
This commit is contained in:
@ -28,12 +28,13 @@ public class LightOptionParser {
|
||||
/// Find the definition for this option.
|
||||
def optDef = optionDefinitions.find {
|
||||
it.key == foundName || it.value.longName == foundName }
|
||||
def optName = optDef.key
|
||||
optDef = optDef.value
|
||||
|
||||
if (!optDef) throw new IllegalArgumentException(
|
||||
"Unrecognized option: '${args[optInfo.idx]}.")
|
||||
|
||||
def optName = optDef.key
|
||||
optDef = optDef.value
|
||||
|
||||
/// Remember the option index for later.
|
||||
optionArgIndices << optInfo.idx
|
||||
|
||||
|
Reference in New Issue
Block a user