diff options
| author | Adam Vandenberg | 2013-01-29 20:45:33 -0800 |
|---|---|---|
| committer | Adam Vandenberg | 2013-01-29 20:45:33 -0800 |
| commit | 7581bd843a291dd3d4e5e4dfa4321bb845dc4f0e (patch) | |
| tree | b888ccd1691f039bfef5376092ad31418df43674 /Library | |
| parent | dd5ea24d48f1e72cd068a740a8a972cfb5fe1605 (diff) | |
| download | homebrew-7581bd843a291dd3d4e5e4dfa4321bb845dc4f0e.tar.bz2 | |
Only check keg-only if we map to a formula
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/link.rb | 14 |
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 |
