brew doctor: warn about SSL_CERT_FILE (#1284)

Multiple issues have been filed about this environment variable, hence
give a warning. #932 might make this unnecessary when merged, but
hopefully this warning can be merged quickly.
This commit is contained in:
Paolo G. Giarrusso 2016-10-13 16:31:12 +02:00
parent 8d6921d7f3
commit aa8242bb66

View File

@ -617,6 +617,18 @@ module Homebrew
message message
end end
def check_ssl_cert_file
return unless ENV.key?("SSL_CERT_FILE")
<<-EOS.undent
Setting SSL_CERT_FILE can break downloading files; if that happens
you should unset it before running Homebrew.
Homebrew uses the system curl which uses system certificates by
default. Setting SSL_CERT_FILE makes it use an outdated OpenSSL, which
does not support modern OpenSSL certificate stores.
EOS
end
def check_for_symlinked_cellar def check_for_symlinked_cellar
return unless HOMEBREW_CELLAR.exist? return unless HOMEBREW_CELLAR.exist?
return unless HOMEBREW_CELLAR.symlink? return unless HOMEBREW_CELLAR.symlink?