aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorXu Cheng2015-09-12 16:33:11 +0800
committerXu Cheng2015-09-12 18:26:16 +0800
commit635340e32e324b3884dcba4593a55ad53b838ae0 (patch)
treeb724699c508c278320cd988b0c4b622c43109596 /Library
parented87972e2d80782616fa2aa04771f710ee89f389 (diff)
downloadbrew-635340e32e324b3884dcba4593a55ad53b838ae0.tar.bz2
bottle: allow updating :any to :any_skip_relocation when keep old
Closes Homebrew/homebrew#43849. Signed-off-by: Xu Cheng <xucheng@me.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/bottle.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/bottle.rb b/Library/Homebrew/cmd/bottle.rb
index 1df7b2b6e..7774a568f 100644
--- a/Library/Homebrew/cmd/bottle.rb
+++ b/Library/Homebrew/cmd/bottle.rb
@@ -235,6 +235,7 @@ module Homebrew
bad_fields = [:root_url, :prefix, :cellar, :revision].select do |field|
old_spec.send(field) != bottle.send(field)
end
+ bad_fields.delete(:cellar) if old_spec.cellar == :any && bottle.cellar == :any_skip_relocation
if bad_fields.any?
bottle_path.unlink if bottle_path.exist?
odie "--keep-old is passed but there are changes in: #{bad_fields.join ", "}"
@@ -289,7 +290,7 @@ module Homebrew
bad_fields = [:root_url, :prefix, :cellar, :revision].select do |field|
old_spec.send(field) != bottle.send(field)
end
-
+ bad_fields.delete(:cellar) if old_spec.cellar == :any && bottle.cellar == :any_skip_relocation
if bad_fields.any?
ofail "--keep-old is passed but there are changes in: #{bad_fields.join ", "}"
next