download_strategy: make sure the inspected url is used
Closes Homebrew/homebrew#40940. Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
parent
b363175401
commit
0276c3c70c
@ -274,6 +274,7 @@ class CurlDownloadStrategy < AbstractFileDownloadStrategy
|
||||
urls = actual_urls
|
||||
unless urls.empty?
|
||||
ohai "Downloading from #{urls.last}"
|
||||
@url = urls.last
|
||||
if !ENV["HOMEBREW_NO_INSECURE_REDIRECT"].nil? && @url.start_with?("https://") &&
|
||||
urls.any? { |u| !u.start_with? "https://" }
|
||||
raise "HTTPS to HTTP redirect detected & HOMEBREW_NO_INSECURE_REDIRECT is set."
|
||||
|
Loading…
x
Reference in New Issue
Block a user