aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorAdam Vandenberg2013-01-29 20:45:33 -0800
committerAdam Vandenberg2013-01-29 20:45:33 -0800
commit0dec35e7b0f0a7fe2552e4c53439b4f5a54f41de (patch)
tree44ea421f99df765a164abc55d1a14ad16b3407e2 /Library/Homebrew/cmd
parent40c339e3490bbce04127e7c4f0e27037ba85d34a (diff)
downloadbrew-0dec35e7b0f0a7fe2552e4c53439b4f5a54f41de.tar.bz2
Only check keg-only if we map to a formula
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/link.rb14
1 files changed, 9 insertions, 5 deletions
diff --git a/Library/Homebrew/cmd/link.rb b/Library/Homebrew/cmd/link.rb
index 76a3b00f0..5423478c0 100644
--- a/Library/Homebrew/cmd/link.rb
+++ b/Library/Homebrew/cmd/link.rb
@@ -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