aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorDavid Turner2014-04-10 18:58:09 -0400
committerAdam Vandenberg2014-04-18 08:40:39 -0700
commit5ab2dd7f688d5225ec2225fe3114e33f99830c8b (patch)
tree80d97162fd3a2989be2ab61d7e7b3c4510e8795a /Library/Homebrew
parente6d8f37b68ce6c1ad6598237e0206623e9a76823 (diff)
downloadhomebrew-5ab2dd7f688d5225ec2225fe3114e33f99830c8b.tar.bz2
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 <flangy@gmail.com>
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/formulary.rb4
1 files changed, 3 insertions, 1 deletions
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