From 0254605cd52b1bb92ffe33114c671cc111c5a687 Mon Sep 17 00:00:00 2001 From: Kevin Abel Date: Sat, 13 Jan 2018 17:06:21 -0600 Subject: [PATCH] Handle reaching the top of a URL which searching for file ext Should never reach this as most URL's will have a domain name that will be caught as an extname. --- Library/Homebrew/download_strategy.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 3419475445..2774f2fadb 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -306,6 +306,7 @@ class AbstractFileDownloadStrategy < AbstractDownloadStrategy url_pathname = Pathname.new(@url) until ext = url_pathname.extname[/[^?]+/] url_pathname = url_pathname.dirname + return if url_pathname.to_s == "." end ext end