Merge pull request #11283 from MikeMcQuaid/no_bottle_changes_error_handling

dev-cmd/bottle: handle empty collector tags.
This commit is contained in:
Mike McQuaid 2021-04-29 16:32:35 +01:00 committed by GitHub
commit 7ba634ccb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -654,9 +654,15 @@ module Homebrew
bottle.rebuild != old_bottle_spec.rebuild && bottle.rebuild != old_bottle_spec.rebuild &&
bottle.root_url == old_bottle_spec.root_url bottle.root_url == old_bottle_spec.root_url
bottle.collector.keys.all? do |tag| bottle.collector.keys.all? do |tag|
next false if bottle.collector[tag][:cellar] != old_bottle_spec.collector[tag][:cellar] bottle_collector_tag = bottle.collector[tag]
next false if bottle_collector_tag.blank?
bottle.collector[tag][:checksum].hexdigest == old_bottle_spec.collector[tag][:checksum].hexdigest old_bottle_spec_collector_tag = old_bottle_spec.collector[tag][tag]
next false if old_bottle_spec_collector_tag.blank?
next false if bottle_collector_tag[:cellar] != old_bottle_spec_collector_tag[:cellar]
bottle_collector_tag[:checksum].hexdigest == old_bottle_spec_collector_tag[:checksum].hexdigest
end end
end end