Skip to content

Commit

Permalink
fix from Homebrew#16079
Browse files Browse the repository at this point in the history
  • Loading branch information
EricFromCanada committed Oct 4, 2023
1 parent f61e4ee commit c3ef946
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Library/Homebrew/download_strategy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,11 @@ def resolve_url_basename_time_file_size(url, timeout: nil)
@resolved_info_cache ||= {}
return @resolved_info_cache[url] if @resolved_info_cache.include?(url)

parsed_output = curl_headers(url.to_s, wanted_headers: ["content-disposition"], timeout: timeout)
begin
parsed_output = curl_headers(url.to_s, wanted_headers: ["content-disposition"], timeout: timeout)
rescue ErrorDuringExecution
return [url, parse_basename(url), nil, nil, false]
end
parsed_headers = parsed_output.fetch(:responses).map { |r| r.fetch(:headers) }

final_url = curl_response_follow_redirections(parsed_output.fetch(:responses), url)
Expand Down

0 comments on commit c3ef946

Please sign in to comment.