Added a test to see if it works
This commit is contained in:
@@ -217,7 +217,9 @@ module CliGen
|
||||
# error message if caught
|
||||
handle_flag_raises do
|
||||
if match.requires_arg?
|
||||
match.process(args.reject(&.processed?).take_while{|v| find_match(v.value) == CliGen::MatchType::NoMatch})
|
||||
match.process(args.reject(&.processed?).take_while{|v|
|
||||
find_match(v.value) == CliGen::MatchType::NoMatch || !!match.meta.options.try(&.includes?(v.value))
|
||||
})
|
||||
else
|
||||
match.process
|
||||
end
|
||||
@@ -258,7 +260,9 @@ module CliGen
|
||||
## If this is the last flag provided in the clump do the thing
|
||||
if index == chars.size - 1
|
||||
if match.requires_arg?
|
||||
match.process(args.reject(&.processed?).take_while{|v| find_match(v.value) == CliGen::MatchType::NoMatch})
|
||||
match.process(args.reject(&.processed?).take_while{|v|
|
||||
find_match(v.value) == CliGen::MatchType::NoMatch || !! match.meta.options.try(&.includes?(v.value))
|
||||
})
|
||||
else
|
||||
match.process
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user