Skip to content
Snippets Groups Projects
Commit 3d7c38c7 authored by Baptiste Fontaine's avatar Baptiste Fontaine
Browse files

doctor: suggest to install git if the system one is outdated


Closes Homebrew/homebrew#42934.

Signed-off-by: default avatarBaptiste Fontaine <batifon@yahoo.fr>
parent 54145979
No related branches found
No related tags found
No related merge requests found
......@@ -862,11 +862,14 @@ class Checks
# https://help.github.com/articles/https-cloning-errors
`git --version`.chomp =~ /git version ((?:\d+\.?)+)/
if $1 && Version.new($1) < Version.new("1.7.10") then <<-EOS.undent
An outdated version of Git was detected in your PATH.
Git 1.7.10 or newer is required to perform checkouts over HTTPS from GitHub.
Please upgrade: brew upgrade git
EOS
if $1 && Version.new($1) < Version.new("1.7.10") then
git_upgrade_cmd = Formula["git"].any_version_installed? ? "upgrade" : "install"
<<-EOS.undent
An outdated version of Git was detected in your PATH.
Git 1.7.10 or newer is required to perform checkouts over HTTPS from GitHub.
Please upgrade: brew #{git_upgrade_cmd} git
EOS
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment