aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorDavid Turner2014-04-10 18:58:09 -0400
committerAdam Vandenberg2014-04-18 08:40:39 -0700
commit629b244cf85a6f4b8c9474a6e532f6ef7b7febf6 (patch)
treefbb7b202025558e7838453312d923fe5e6671687 /Library
parentdaa7b7b6dbeedf541b188d015bcaaf87a17b517a (diff)
downloadbrew-629b244cf85a6f4b8c9474a6e532f6ef7b7febf6.tar.bz2
Handle formula URLs with query parameters. This is useful for fetching formulas from cgit repositories, which uses ?h= to choose branches.
Closes Homebrew/homebrew#28314. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
-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