diff options
| author | Jack Nagel | 2011-11-10 22:53:10 -0600 |
|---|---|---|
| committer | Jack Nagel | 2011-11-10 22:53:10 -0600 |
| commit | a077f71502d565223e4f26e9e1b3efdeba801bf0 (patch) | |
| tree | e65103ce5a319a83213f64c9538fbe38be747b4e /Library | |
| parent | 83ed63cf8a9146e41eac33205a632183e513ff2d (diff) | |
| download | homebrew-a077f71502d565223e4f26e9e1b3efdeba801bf0.tar.bz2 | |
doctor: check_git_status in correct location
This would silently fail if HOMEBREW_REPOSITORY != HOMEBREW_PREFIX,
which is obviously a valid Homebrew setup.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/doctor.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb index 01632d66b..0de6508ca 100644 --- a/Library/Homebrew/cmd/doctor.rb +++ b/Library/Homebrew/cmd/doctor.rb @@ -750,8 +750,9 @@ def check_missing_deps 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 File.directory? HOMEBREW_REPOSITORY+'.git' and not `#{status_cmd}`.empty? + repo = HOMEBREW_REPOSITORY + status_cmd = "git --git-dir=#{repo}/.git --work-tree=#{repo} status -s #{repo}/Library/Homebrew" + if system "/usr/bin/which -s git" and File.directory? repo+'.git' and not `#{status_cmd}`.empty? ohai "You have uncommitted modifications to Homebrew's core." puts "Unless you know what you are doing, you should: git reset --hard" puts |
