diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb index a9624397e63da5f12b7161ce709804419c6b1b3e..63c3265230eeff3a939242eebe4cd816ff82bfec 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