aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Nagel2011-09-19 21:47:17 -0500
committerJack Nagel2011-09-19 21:49:29 -0500
commit03a97df974ed419eddfb5f00cd1d5ef9589e2ff1 (patch)
tree06d34d684cec5a7f90218894eeaf2d8a4809a6ff
parent6ad9225ab795ab9731b4d45cd074513e73cae5ca (diff)
downloadhomebrew-03a97df974ed419eddfb5f00cd1d5ef9589e2ff1.tar.bz2
doctor: only check git status if repository exists
Closes #7722. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
-rw-r--r--Library/Homebrew/cmd/doctor.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index e8f014392..cad145b5e 100644
--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -753,7 +753,7 @@ end
def check_git_status
status_cmd = "git --git-dir=#{HOMEBREW_REPOSITORY}/.git --work-tree=#{HOMEBREW_PREFIX} status -s #{HOMEBREW_PREFIX}/Library/Homebrew"
- if system "/usr/bin/which -s git" and not `#{status_cmd}`.empty?
+ if system "/usr/bin/which -s git" and File.directory? HOMEBREW_REPOSITORY+'.git' and not `#{status_cmd}`.empty?
ohai "You have uncommitted modifications to Homebrew core"
puts "Unless you know what you are doing, you should: git reset --hard"
puts