From 17953f2b83ba764c5cd5dc679d98c82fb6cc4b77 Mon Sep 17 00:00:00 2001 From: Misty De Meo Date: Sun, 22 Jul 2012 10:49:50 -0500 Subject: 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. --- Library/Homebrew/cmd/unlink.rb | 1 - 1 file changed, 1 deletion(-) (limited to 'Library/Homebrew/cmd') 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 -- cgit v1.2.3