Skip to content

Commit

Permalink
fix argument match regex
Browse files Browse the repository at this point in the history
Co-authored-by: Jason Frey <[email protected]>
  • Loading branch information
nanobowers and Fryguy authored May 3, 2024
1 parent a3e34f5 commit 7514de5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/optimist.rb
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ def parse(cmdline = ARGV)
if arg =~ /--no-/ # explicitly invalidate --no-no- arguments
sym = nil
## Support inexact matching of long-arguments like perl's Getopt::Long
elsif !sym && !@settings[:exact_match] && arg.match(/^--(\S*)$/)
elsif !sym && !@settings[:exact_match] && arg.match(/^--(\S+)$/)
sym = perform_inexact_match(arg, $1)
end

Expand Down

0 comments on commit 7514de5

Please sign in to comment.