dev-cmd/bottle: handle empty collector tags.

Fixes https://github.com/Homebrew/homebrew-core/runs/2467738434?check_suite_focus=true#step:6:458
This commit is contained in:
Mike McQuaid 2021-04-29 16:00:22 +01:00
parent 9a65c70d90
commit f9589429d6
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -654,9 +654,15 @@ module Homebrew
bottle.rebuild != old_bottle_spec.rebuild &&
bottle.root_url == old_bottle_spec.root_url
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