Merge pull request #6607 from dawidd6/keep-old-but-not-cellar
bottle: don't keep old cellar
This commit is contained in:
commit
333642927b
@ -367,9 +367,11 @@ module Homebrew
|
|||||||
mismatches = [:root_url, :prefix, :cellar, :rebuild].reject do |key|
|
mismatches = [:root_url, :prefix, :cellar, :rebuild].reject do |key|
|
||||||
old_spec.send(key) == bottle.send(key)
|
old_spec.send(key) == bottle.send(key)
|
||||||
end
|
end
|
||||||
if old_spec.cellar == :any && bottle.cellar == :any_skip_relocation
|
if (old_spec.cellar == :any && bottle.cellar == :any_skip_relocation) ||
|
||||||
|
(old_spec.cellar == cellar &&
|
||||||
|
[:any, :any_skip_relocation].include?(bottle.cellar))
|
||||||
mismatches.delete(:cellar)
|
mismatches.delete(:cellar)
|
||||||
bottle.cellar :any
|
bottle.cellar old_spec.cellar
|
||||||
end
|
end
|
||||||
unless mismatches.empty?
|
unless mismatches.empty?
|
||||||
bottle_path.unlink if bottle_path.exist?
|
bottle_path.unlink if bottle_path.exist?
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user