aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/unlink.rb
diff options
context:
space:
mode:
authorMisty De Meo2012-07-22 10:49:50 -0500
committerMisty De Meo2012-07-22 10:58:19 -0500
commit17953f2b83ba764c5cd5dc679d98c82fb6cc4b77 (patch)
treea35eeda6cfff5c83b0647e93be9c361f10b71c27 /Library/Homebrew/cmd/unlink.rb
parentd2a8df71ce314a874c5803a4b32841f8da14add0 (diff)
downloadbrew-17953f2b83ba764c5cd5dc679d98c82fb6cc4b77.tar.bz2
Keg#unlink: check destination before unlinking
Rather than skip unlinking if there's no linked keg record, check to see whether the destination's realpath is the same as the source file in the keg being unlinked.
Diffstat (limited to 'Library/Homebrew/cmd/unlink.rb')
-rw-r--r--Library/Homebrew/cmd/unlink.rb1
1 files changed, 0 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/unlink.rb b/Library/Homebrew/cmd/unlink.rb
index 692278fb0..12b037781 100644
--- a/Library/Homebrew/cmd/unlink.rb
+++ b/Library/Homebrew/cmd/unlink.rb
@@ -3,7 +3,6 @@ module Homebrew extend self
raise KegUnspecifiedError if ARGV.named.empty?
ARGV.kegs.each do |keg|
- return if !keg.linked?
print "Unlinking #{keg}... "
puts "#{keg.unlink} links removed"
end