From a252c90a0d49cae0889a9a540a3c220c53340425 Mon Sep 17 00:00:00 2001 From: Mike McQuaid <mike@mikemcquaid.com> Date: Wed, 30 Oct 2013 10:34:04 -0700 Subject: [PATCH] doctor: ensure git --version actually matches. Closes Homebrew/homebrew#23791. --- Library/Homebrew/cmd/doctor.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb index a9624397e6..63c3265230 100644 --- a/Library/Homebrew/cmd/doctor.rb +++ b/Library/Homebrew/cmd/doctor.rb @@ -723,7 +723,7 @@ def __check_git_version # https://help.github.com/articles/https-cloning-errors `git --version`.chomp =~ /git version ((?:\d+\.?)+)/ - if Version.new($1) < Version.new("1.7.10") then <<-EOS.undent + if $1 and 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 -- GitLab