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 Homebrew/homebrew#10296.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
parent
83e9dbf266
commit
86e7c8a772
@ -39,7 +39,7 @@ module Homebrew extend self
|
|||||||
installer.show_header = false
|
installer.show_header = false
|
||||||
oh1 "Upgrading #{f.name}"
|
oh1 "Upgrading #{f.name}"
|
||||||
installer.install
|
installer.install
|
||||||
Keg.new("#{f.rack}/#{f.version}").unlink
|
Keg.new(f.linked_keg.realpath).unlink if f.linked_keg.directory?
|
||||||
installer.caveats
|
installer.caveats
|
||||||
installer.finish # includes link step
|
installer.finish # includes link step
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user