From 02b97600af01f8a59566defe27af8673c48edd64 Mon Sep 17 00:00:00 2001 From: Chongyu Zhu Date: Thu, 11 Jul 2019 03:45:07 +0800 Subject: [PATCH] bottle_publisher: fix bottle info accessor --- Library/Homebrew/bottle_publisher.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/bottle_publisher.rb b/Library/Homebrew/bottle_publisher.rb index a6c34a3801..5a59183e02 100644 --- a/Library/Homebrew/bottle_publisher.rb +++ b/Library/Homebrew/bottle_publisher.rb @@ -107,14 +107,14 @@ class BottlePublisher # Poll for publication completion using a quick partial HEAD, to avoid spurious error messages # 401 error is normal while file is still in async publishing process - url = URI(bottle_info.url) + url = URI(bottle_info["url"]) puts "Verifying bottle: #{File.basename(url.path)}" http = Net::HTTP.new(url.host, url.port) http.use_ssl = true retry_count = 0 http.start do loop do - req = Net::HTTP::Head.new bottle_info.url + req = Net::HTTP::Head.new url req.initialize_http_header "User-Agent" => HOMEBREW_USER_AGENT_RUBY res = http.request req break if res.is_a?(Net::HTTPSuccess) || res.code == "302" @@ -154,7 +154,7 @@ class BottlePublisher retry_count += 1 end end - checksum = Checksum.new(:sha256, bottle_info.sha256) + checksum = Checksum.new(:sha256, bottle_info["sha256"]) Pathname.new(filename).verify_checksum(checksum) end end