bottle: allow updating :any to :any_skip_relocation when keep old
Closes Homebrew/homebrew#43849. Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
parent
ed87972e2d
commit
635340e32e
@ -235,6 +235,7 @@ module Homebrew
|
|||||||
bad_fields = [:root_url, :prefix, :cellar, :revision].select do |field|
|
bad_fields = [:root_url, :prefix, :cellar, :revision].select do |field|
|
||||||
old_spec.send(field) != bottle.send(field)
|
old_spec.send(field) != bottle.send(field)
|
||||||
end
|
end
|
||||||
|
bad_fields.delete(:cellar) if old_spec.cellar == :any && bottle.cellar == :any_skip_relocation
|
||||||
if bad_fields.any?
|
if bad_fields.any?
|
||||||
bottle_path.unlink if bottle_path.exist?
|
bottle_path.unlink if bottle_path.exist?
|
||||||
odie "--keep-old is passed but there are changes in: #{bad_fields.join ", "}"
|
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|
|
bad_fields = [:root_url, :prefix, :cellar, :revision].select do |field|
|
||||||
old_spec.send(field) != bottle.send(field)
|
old_spec.send(field) != bottle.send(field)
|
||||||
end
|
end
|
||||||
|
bad_fields.delete(:cellar) if old_spec.cellar == :any && bottle.cellar == :any_skip_relocation
|
||||||
if bad_fields.any?
|
if bad_fields.any?
|
||||||
ofail "--keep-old is passed but there are changes in: #{bad_fields.join ", "}"
|
ofail "--keep-old is passed but there are changes in: #{bad_fields.join ", "}"
|
||||||
next
|
next
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user