Merge pull request #5365 from iMichka/bottle

brew bottle --keep-old: Combining :any and :any_skip_relocation yields :any
This commit is contained in:
Shaun Jackman 2018-12-04 08:56:14 -08:00 committed by GitHub
commit 81021e6a60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -406,7 +406,10 @@ module Homebrew
mismatches = [:root_url, :prefix, :cellar, :rebuild].reject do |key|
old_spec.send(key) == bottle.send(key)
end
mismatches.delete(:cellar) if old_spec.cellar == :any && bottle.cellar == :any_skip_relocation
if old_spec.cellar == :any && bottle.cellar == :any_skip_relocation
mismatches.delete(:cellar)
bottle.cellar :any
end
unless mismatches.empty?
bottle_path.unlink if bottle_path.exist?