download_strategy: fix url reassign
We need reassign url after urls are inspected.
This commit is contained in:
parent
b18015a7e1
commit
7a75bbd85a
@ -274,11 +274,11 @@ class CurlDownloadStrategy < AbstractFileDownloadStrategy
|
|||||||
urls = actual_urls
|
urls = actual_urls
|
||||||
unless urls.empty?
|
unless urls.empty?
|
||||||
ohai "Downloading from #{urls.last}"
|
ohai "Downloading from #{urls.last}"
|
||||||
@url = 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."
|
||||||
end
|
end
|
||||||
|
@url = urls.last
|
||||||
end
|
end
|
||||||
|
|
||||||
had_incomplete_download = temporary_path.exist?
|
had_incomplete_download = temporary_path.exist?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user