aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/link.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/link.rb b/Library/Homebrew/cmd/link.rb
index 6371c41de..76a3b00f0 100644
--- a/Library/Homebrew/cmd/link.rb
+++ b/Library/Homebrew/cmd/link.rb
@@ -35,6 +35,13 @@ 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
+ end
+
keg.lock do
print "Linking #{keg}... " do
puts "#{keg.link(mode)} symlinks created"