formula_installer: fix option-with-value handling
When passing formula options with value, e.g. `--with-qt=5`, to the child process responsible for building a formula, `ARGV.value` would be invoked with `nil`. Handle this more elegantly (no change in behavior). For consistency, use a regular expression adapted from `Options.create` instead of the somewhat bogus one used before.
This commit is contained in:
parent
745a1312dc
commit
2e961dc9de
@ -538,9 +538,9 @@ class FormulaInstaller
|
||||
end
|
||||
|
||||
formula.options.each do |opt|
|
||||
name = opt.name[/\A(.+)=\z$/, 1]
|
||||
value = ARGV.value(name)
|
||||
args << "--#{name}=#{value}" if name && value
|
||||
name = opt.name[/^([^=])+=$/, 1]
|
||||
value = ARGV.value(name) if name
|
||||
args << "--#{name}=#{value}" if value
|
||||
end
|
||||
|
||||
args
|
||||
|
Loading…
x
Reference in New Issue
Block a user