aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2012-02-20 15:02:32 -0600
committerJack Nagel2012-02-20 15:14:31 -0600
commitfbb583719b497791ffee2d9bacbd71ca9e403cbd (patch)
tree74c47c8efc354b2df39e92193e0dc621d8b70dc2 /Library
parent799126c40ac15948fa967a082e63da154a22fe11 (diff)
downloadhomebrew-fbb583719b497791ffee2d9bacbd71ca9e403cbd.tar.bz2
upgrade: unlink relative to the correct keg
Calling Keg#unlink on "#{f.rack}/#{f.version}" will perform the unlink relative to the _new_ keg, rather than the keg we are upgrading from. Fix this by resolving the linked_keg entry and unlinking relative to it. Fixes #10296. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/upgrade.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/upgrade.rb b/Library/Homebrew/cmd/upgrade.rb
index f0682262f..44a88529b 100644
--- a/Library/Homebrew/cmd/upgrade.rb
+++ b/Library/Homebrew/cmd/upgrade.rb
@@ -39,7 +39,7 @@ module Homebrew extend self
installer.show_header = false
oh1 "Upgrading #{f.name}"
installer.install
- Keg.new("#{f.rack}/#{f.version}").unlink
+ Keg.new(f.linked_keg.realpath).unlink if f.linked_keg.directory?
installer.caveats
installer.finish # includes link step
end