aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/utils
diff options
context:
space:
mode:
authorMike McQuaid2017-01-07 19:28:53 +0000
committerGitHub2017-01-07 19:28:53 +0000
commit871213932763eac4f62ec3a9d2dcbaffdc2042fa (patch)
treefb9c481a6389d6e3117c678b8e92d78acfd0f019 /Library/Homebrew/utils
parent67d0af9674b749d5bd6abf5b9a7ce1f111c171a4 (diff)
parente7a81caaf4bc0468fdc302656efebd584e10a3f6 (diff)
downloadbrew-871213932763eac4f62ec3a9d2dcbaffdc2042fa.tar.bz2
Merge pull request #1798 from MikeMcQuaid/audit-fake-safari-user-agent
Allow `brew audit` to fake a Safari user-agent.
Diffstat (limited to 'Library/Homebrew/utils')
-rw-r--r--Library/Homebrew/utils/curl.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/Library/Homebrew/utils/curl.rb b/Library/Homebrew/utils/curl.rb
index eab623c40..5a40ae846 100644
--- a/Library/Homebrew/utils/curl.rb
+++ b/Library/Homebrew/utils/curl.rb
@@ -12,7 +12,10 @@ def curl_args(options = {})
"--location",
]
- unless options[:default_user_agent]
+ case options[:user_agent]
+ when :browser
+ args << "--user-agent" << HOMEBREW_USER_AGENT_FAKE_SAFARI
+ else
args << "--user-agent" << HOMEBREW_USER_AGENT_CURL
end