bottle: set bottle.cellar to old_spec.cellar if deleting mismatch

Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Dawid Dziurla 2019-10-21 14:03:50 +02:00
parent e19fab86c0
commit aa9950282f
No known key found for this signature in database
GPG Key ID: 7B6D8368172E9B0B

View File

@ -371,7 +371,7 @@ module Homebrew
(old_spec.cellar == cellar &&
[:any, :any_skip_relocation].include?(bottle.cellar))
mismatches.delete(:cellar)
bottle.cellar :any
bottle.cellar old_spec.cellar
end
unless mismatches.empty?
bottle_path.unlink if bottle_path.exist?