aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMarkus Reiter2017-08-09 07:51:07 +0200
committerGitHub2017-08-09 07:51:07 +0200
commit33abea9eb3f6ff77e8478c1315e3b9454ca656aa (patch)
treece0d423225fa0f7ed5632fa9665108cb1622aa59 /Library
parent1a30c165bfb82ae846e64c508f06455e0d3f285e (diff)
parent2cba3222008a6b326b60bbe0180c3985b6cb3a0a (diff)
downloadbrew-33abea9eb3f6ff77e8478c1315e3b9454ca656aa.tar.bz2
Merge pull request #3030 from reitermarkus/curl-args
Allow `curl` args to be overriden.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/test/cask/download_strategy_spec.rb2
-rw-r--r--Library/Homebrew/utils/curl.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/test/cask/download_strategy_spec.rb b/Library/Homebrew/test/cask/download_strategy_spec.rb
index 60d101bdb..17da1e36e 100644
--- a/Library/Homebrew/test/cask/download_strategy_spec.rb
+++ b/Library/Homebrew/test/cask/download_strategy_spec.rb
@@ -26,11 +26,11 @@ describe "download strategies", :cask do
downloader.fetch
expect(downloader).to have_received(:curl).with(
- cask.url.to_s,
"--location",
"--remote-time",
"--continue-at", "-",
"--output", kind_of(Pathname),
+ cask.url.to_s,
user_agent: :default
)
end
diff --git a/Library/Homebrew/utils/curl.rb b/Library/Homebrew/utils/curl.rb
index 6aaf9be0c..9f0d8f75d 100644
--- a/Library/Homebrew/utils/curl.rb
+++ b/Library/Homebrew/utils/curl.rb
@@ -38,7 +38,7 @@ def curl(*args)
end
def curl_download(*args, to: nil, **options)
- curl(*args, "--location", "--remote-time", "--continue-at", "-", "--output", to, **options)
+ curl("--location", "--remote-time", "--continue-at", "-", "--output", to, *args, **options)
end
def curl_output(*args, **options)