bottle: improve --keep-old error message for merge as well
This commit is contained in:
parent
fe204fdf4b
commit
55616a4d01
@ -273,12 +273,12 @@ module Homebrew
|
|||||||
|
|
||||||
old_spec = f.bottle_specification
|
old_spec = f.bottle_specification
|
||||||
if keep_old && !old_spec.checksums.empty?
|
if keep_old && !old_spec.checksums.empty?
|
||||||
bad = [:root_url, :prefix, :cellar, :revision].any? 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
|
||||||
|
|
||||||
if bad
|
if bad_fields.any?
|
||||||
ofail "--keep-old is passed but at least one of fields are not the same, skip it"
|
ofail "--keep-old is passed but there are changes in: #{bad_fields.join ", "}"
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user