From dd5ea24d48f1e72cd068a740a8a972cfb5fe1605 Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Tue, 29 Jan 2013 20:31:33 -0800 Subject: Require --force to link keg-only. Closes #13349. --- Library/Homebrew/cmd/link.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Library') 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" -- cgit v1.2.3