aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorJack Nagel2011-10-03 13:55:51 -0500
committerJack Nagel2011-10-03 13:57:33 -0500
commit2f85acfeb2a88c34ae44d2368e49f70fd50aa8e4 (patch)
tree267866c4ef00a24b1c3ba21db2159017acaf52cc /Library/Homebrew/cmd
parente0c53c56e4e7ec06636b967cb9900a3d2849fd52 (diff)
downloadbrew-2f85acfeb2a88c34ae44d2368e49f70fd50aa8e4.tar.bz2
doctor: warn about expired SSL certs on Leopard
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/doctor.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index 919ab83ad..02fdce888 100644
--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -759,6 +759,23 @@ def check_git_status
end
end
+def check_for_leopard_ssl
+ if MacOS.leopard? and not ENV['GIT_SSL_NO_VERIFY']
+ puts <<-EOS.undent
+ The version of libcurl provided with Mac OS X Leopard has outdated
+ SSL certificates.
+
+ This can cause problems when running Homebrew commands that use Git to
+ fetch over HTTPS, e.g. `brew update` or installing formulae that perform
+ Git checkouts.
+
+ You can force Git to ignore these errors by setting $GIT_SSL_NO_VERIFY.
+ export GIT_SSL_NO_VERIFY=1
+
+ EOS
+ end
+end
+
module Homebrew extend self
def doctor
old_stdout = $stdout
@@ -802,6 +819,7 @@ module Homebrew extend self
check_tmpdir
check_missing_deps
check_git_status
+ check_for_leopard_ssl
ensure
$stdout = old_stdout
end