download_strategy: don't check url if already downloaded
Closes Homebrew/homebrew#40859. Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
parent
7c83e3ffe3
commit
05d9622c02
@ -270,6 +270,7 @@ class CurlDownloadStrategy < AbstractFileDownloadStrategy
|
||||
def fetch
|
||||
ohai "Downloading #{@url}"
|
||||
|
||||
unless cached_location.exist?
|
||||
urls = actual_urls
|
||||
unless urls.empty?
|
||||
ohai "Downloading from: #{urls.last}"
|
||||
@ -279,7 +280,6 @@ class CurlDownloadStrategy < AbstractFileDownloadStrategy
|
||||
end
|
||||
end
|
||||
|
||||
unless cached_location.exist?
|
||||
had_incomplete_download = temporary_path.exist?
|
||||
begin
|
||||
_fetch
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user