pull --bottle: Fix bug in any_bottle_tag

Utils::Bottles.tag is a symbol, whereas bottle_tags is an array of strings.
This commit is contained in:
Shaun Jackman 2018-11-01 09:28:31 -07:00
parent 5556aba0ce
commit f70a2c67da

View File

@ -581,7 +581,7 @@ module Homebrew
end end
def any_bottle_tag def any_bottle_tag
tag = Utils::Bottles.tag tag = Utils::Bottles.tag.to_s
# Prefer native bottles as a convenience for download caching # Prefer native bottles as a convenience for download caching
bottle_tags.include?(tag) ? tag : bottle_tags.first bottle_tags.include?(tag) ? tag : bottle_tags.first
end end
@ -640,7 +640,7 @@ module Homebrew
opoo "Cannot publish bottle: Failed reading info for formula #{f.full_name}" opoo "Cannot publish bottle: Failed reading info for formula #{f.full_name}"
next next
end end
bottle_info = jinfo.bottle_info(jinfo.bottle_tags.first) bottle_info = jinfo.bottle_info_any
unless bottle_info unless bottle_info
opoo "No bottle defined in formula #{f.full_name}" opoo "No bottle defined in formula #{f.full_name}"
next next