From 32ab3bb32f356b628f55e193c8c2d1f8386ab926 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sun, 19 Oct 2014 23:01:09 -0500 Subject: [PATCH] Use curl -d to pass query parameters in the bottle download strategy Fixes Homebrew/homebrew#33355. --- Library/Homebrew/download_strategy.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 911401ad8c..d915ff582c 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -287,10 +287,10 @@ end # This strategy extracts our binary packages. class CurlBottleDownloadStrategy < CurlDownloadStrategy - def initialize name, resource + def curl(*args) + mirror = ENV["HOMEBREW_SOURCEFORGE_MIRROR"] + args << "-G" << "-d" << "use_mirror=#{mirror}" if mirror super - mirror = ENV['HOMEBREW_SOURCEFORGE_MIRROR'] - @url = "#{@url}?use_mirror=#{mirror}" if mirror end def stage