Skip to content
Snippets Groups Projects
Unverified Commit 7452dcf5 authored by Xu Cheng's avatar Xu Cheng
Browse files

ARGV#resolved_formulae: also load build options

parent 2e747aa9
No related branches found
No related tags found
No related merge requests found
......@@ -27,9 +27,11 @@ module HomebrewArgvExtension
@resolved_formulae ||= (downcased_unique_named - casks).map do |name|
if name.include?("/")
f = Formulary.factory(name, spec)
if spec(default=nil).nil? && f.any_version_installed?
installed_spec = Tab.for_formula(f).spec
f.set_active_spec(installed_spec) if f.send(installed_spec)
if f.any_version_installed?
tab = Tab.for_formula(f)
resolved_spec = spec(default=nil) || tab.spec
f.set_active_spec(resolved_spec) if f.send(resolved_spec)
f.build = tab
end
f
else
......
......@@ -227,7 +227,7 @@ class Formulary
tap = tab.tap
spec ||= tab.spec
if tap.nil?
f = if tap.nil?
factory(rack.basename.to_s, spec)
else
begin
......@@ -237,6 +237,8 @@ class Formulary
factory(rack.basename.to_s, spec)
end
end
f.build = tab
f
end
# Return a Formula instance directly from contents
......
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