diff --git a/Library/Homebrew/dev-cmd/bottle.rb b/Library/Homebrew/dev-cmd/bottle.rb index d185453ed7..3c7cdf3368 100644 --- a/Library/Homebrew/dev-cmd/bottle.rb +++ b/Library/Homebrew/dev-cmd/bottle.rb @@ -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?