diff options
| author | Xu Cheng | 2015-06-23 00:23:40 +0800 |
|---|---|---|
| committer | Xu Cheng | 2015-06-23 00:23:44 +0800 |
| commit | 7a75bbd85a6abc9a5828d7d48aa13a27a43432e4 (patch) | |
| tree | a37b21b2996df8e8f6d380d66747518d3f0c4c5b /Library | |
| parent | b18015a7e16087585f77862693807cb00dc30b31 (diff) | |
| download | brew-7a75bbd85a6abc9a5828d7d48aa13a27a43432e4.tar.bz2 | |
download_strategy: fix url reassign
We need reassign url after urls are inspected.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/download_strategy.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 5e27c4e0a..33f824dba 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -274,11 +274,11 @@ 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." end + @url = urls.last end had_incomplete_download = temporary_path.exist? |
