Ensure that equals options get parsed properly
Options such as --userimg=<path> should be parsed as an option with an
equals in its name ("userimg=") and without the path argument in
Option.name
Closes Homebrew/homebrew#34219.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
parent
824e187803
commit
6a1f829cfa
@ -58,7 +58,7 @@ class Options
|
||||
include Enumerable
|
||||
|
||||
def self.create(array)
|
||||
new array.map { |e| Option.new(e[/^--(.+)$/, 1] || e) }
|
||||
new array.map { |e| Option.new(e[/^--([^=]+=?)(.+)?$/, 1] || e) }
|
||||
end
|
||||
|
||||
def initialize(*args)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user