aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2011-09-19 21:47:17 -0500
committerJack Nagel2011-09-19 21:49:29 -0500
commitd817e5e51e18064d7691f399c6225550134a40aa (patch)
tree2aac2aca0ea02b77d552a3238c5b19db4b9119f4 /Library
parent28aef26a47dfab5a7bde48363f98b63233413ebf (diff)
downloadbrew-d817e5e51e18064d7691f399c6225550134a40aa.tar.bz2
doctor: only check git status if repository exists
Closes Homebrew/homebrew#7722. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
-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