From 6a1f829cfa3beeb04cdf37d3b9f8969768800db2 Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Sat, 15 Nov 2014 12:03:27 -0800 Subject: Ensure that equals options get parsed properly Options such as --userimg= 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 --- Library/Homebrew/options.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Library') diff --git a/Library/Homebrew/options.rb b/Library/Homebrew/options.rb index 6d6242171..209cfba62 100644 --- a/Library/Homebrew/options.rb +++ b/Library/Homebrew/options.rb @@ -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) -- cgit v1.2.3