diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index ad459318db..86d458f5ee 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -353,6 +353,9 @@ class CurlDownloadStrategy < AbstractFileDownloadStrategy elsif location.start_with?("/") uri = URI(current_url) "#{uri.scheme}://#{uri.host}#{location}" + elsif location.start_with?("./") + uri = URI(current_url) + "#{uri.scheme}://#{uri.host}#{Pathname(uri.path).dirname/location}" else location end