download_strategy: remove extra colon

Closes Homebrew/homebrew#40920.

Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
Xu Cheng 2015-06-20 22:33:00 +08:00
parent 8ef8f0f615
commit 60b70c9931

View File

@ -273,7 +273,7 @@ class CurlDownloadStrategy < AbstractFileDownloadStrategy
unless cached_location.exist? unless cached_location.exist?
urls = actual_urls urls = actual_urls
unless urls.empty? unless urls.empty?
ohai "Downloading from: #{urls.last}" ohai "Downloading from #{urls.last}"
if !ENV["HOMEBREW_NO_INSECURE_REDIRECT"].nil? && @url.start_with?("https://") && if !ENV["HOMEBREW_NO_INSECURE_REDIRECT"].nil? && @url.start_with?("https://") &&
urls.any? { |u| !u.start_with? "https://" } urls.any? { |u| !u.start_with? "https://" }
raise "HTTPS to HTTP redirect detected & HOMEBREW_NO_INSECURE_REDIRECT is set." raise "HTTPS to HTTP redirect detected & HOMEBREW_NO_INSECURE_REDIRECT is set."