From c992749986a949e84b62dcc4070751652d355b31 Mon Sep 17 00:00:00 2001 From: Dominyk Tiller Date: Wed, 26 Aug 2015 18:21:42 +0100 Subject: [PATCH] doctor: add system curl <10.7 check Closes Homebrew/homebrew#43283. Closes Homebrew/homebrew#43298. Signed-off-by: Dominyk Tiller --- Library/Homebrew/cmd/doctor.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb index 91d215e1aa..c1b1b49299 100644 --- a/Library/Homebrew/cmd/doctor.rb +++ b/Library/Homebrew/cmd/doctor.rb @@ -653,13 +653,23 @@ class Checks end end + def check_for_bad_curl + if MacOS.version <= "10.6" && !Formula["curl"].installed? then <<-EOS.undent + The system curl on 10.6 and below is often incapable of supporting + modern secure connections & will fail on fetching formulae. + We recommend you: + brew install curl + EOS + end + end + def check_user_curlrc if %w[CURL_HOME HOME].any? { |key| ENV[key] && File.exist?("#{ENV[key]}/.curlrc") } then <<-EOS.undent You have a curlrc file If you have trouble downloading packages with Homebrew, then maybe this is the problem? If the following command doesn't work, then try removing your curlrc: - curl http://github.com + curl https://github.com EOS end end