Only check keg-only if we map to a formula

This commit is contained in:
Adam Vandenberg 2013-01-29 20:45:33 -08:00
parent 40c339e349
commit 0dec35e7b0

View File

@ -35,11 +35,15 @@ module Homebrew extend self
next
end
f = Formula.factory(keg.fname)
if f.keg_only? and not ARGV.force?
opoo "#{keg.fname} is keg-only and must be linked with --force"
puts "Note that doing so can interfere with building software."
next
begin
f = Formula.factory(keg.fname)
if f.keg_only? and not ARGV.force?
opoo "#{keg.fname} is keg-only and must be linked with --force"
puts "Note that doing so can interfere with building software."
next
end
rescue
# Nothing to see here
end
keg.lock do