From 5ab2dd7f688d5225ec2225fe3114e33f99830c8b Mon Sep 17 00:00:00 2001 From: David Turner Date: Thu, 10 Apr 2014 18:58:09 -0400 Subject: Handle formula URLs with query parameters. This is useful for fetching formulas from cgit repositories, which uses ?h= to choose branches. Closes #28314. Signed-off-by: Adam Vandenberg --- Library/Homebrew/formulary.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Library') diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb index 77ec98a37..e8c47c9aa 100644 --- a/Library/Homebrew/formulary.rb +++ b/Library/Homebrew/formulary.rb @@ -132,7 +132,9 @@ class Formulary def initialize url @url = url - super File.basename(url, ".rb"), HOMEBREW_CACHE_FORMULA/File.basename(url) + uri = URI(url) + formula = File.basename(uri.path, ".rb") + super formula, HOMEBREW_CACHE_FORMULA/File.basename(uri.path) end # Downloads the formula's .rb file -- cgit v1.2.3