link: load formula from rack
This commit is contained in:
parent
c14794baa8
commit
fb8548cae5
@ -14,7 +14,7 @@ module Homebrew
|
|||||||
opoo "Already linked: #{keg}"
|
opoo "Already linked: #{keg}"
|
||||||
puts "To relink: brew unlink #{keg.name} && brew link #{keg.name}"
|
puts "To relink: brew unlink #{keg.name} && brew link #{keg.name}"
|
||||||
next
|
next
|
||||||
elsif keg_only?(keg.name) && !ARGV.force?
|
elsif keg_only?(keg.rack) && !ARGV.force?
|
||||||
opoo "#{keg.name} is keg-only and must be linked with --force"
|
opoo "#{keg.name} is keg-only and must be linked with --force"
|
||||||
puts "Note that doing so can interfere with building software."
|
puts "Note that doing so can interfere with building software."
|
||||||
next
|
next
|
||||||
@ -48,9 +48,9 @@ module Homebrew
|
|||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def keg_only?(name)
|
def keg_only?(rack)
|
||||||
Formulary.factory(name).keg_only?
|
Formulary.from_rack(rack).keg_only?
|
||||||
rescue FormulaUnavailableError
|
rescue FormulaUnavailableError, TapFormulaAmbiguityError
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user