Skip to content
Snippets Groups Projects
Commit 2e961dc9 authored by Martin Afanasjew's avatar Martin Afanasjew
Browse files

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.
parent 745a1312
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment