aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/unlink.rb
diff options
context:
space:
mode:
authorMisty De Meo2012-07-20 11:00:48 -0500
committerMisty De Meo2012-07-20 11:00:48 -0500
commit4c38d151100bd1293a668bfa11d7c38abe7c72c2 (patch)
treeb3f59691bc2180d59c55039e344cfa252fd2684b /Library/Homebrew/cmd/unlink.rb
parenta45bfc87865dcd4aac640cc46fe0ef35a2b55d9c (diff)
downloadbrew-4c38d151100bd1293a668bfa11d7c38abe7c72c2.tar.bz2
brew unlink: don't unlink an unlinked formula
This caused weird issues in the case that multiple formulae provide the same file.
Diffstat (limited to 'Library/Homebrew/cmd/unlink.rb')
-rw-r--r--Library/Homebrew/cmd/unlink.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/unlink.rb b/Library/Homebrew/cmd/unlink.rb
index 12b037781..692278fb0 100644
--- a/Library/Homebrew/cmd/unlink.rb
+++ b/Library/Homebrew/cmd/unlink.rb
@@ -3,6 +3,7 @@ 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