diff options
| author | Jack Nagel | 2012-03-01 23:29:14 -0600 |
|---|---|---|
| committer | Jack Nagel | 2012-03-01 23:29:14 -0600 |
| commit | 7928aa3919597a851f386fa9dd5331ec1d20a6a6 (patch) | |
| tree | 87287e7ba9220276eca80b7ad258bab476d3eb8b /Library | |
| parent | 85d58af36ec2f3402c6aa5204cdeefa9be343627 (diff) | |
| download | homebrew-7928aa3919597a851f386fa9dd5331ec1d20a6a6.tar.bz2 | |
doctor: make `git status` check saner
The order of things made the check for git in the path pointless (and
was my fault); this is a better way to do it.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/doctor.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb index 4094be311..76763208f 100644 --- a/Library/Homebrew/cmd/doctor.rb +++ b/Library/Homebrew/cmd/doctor.rb @@ -732,9 +732,9 @@ def check_missing_deps end def check_git_status + return unless system "/usr/bin/which -s git" HOMEBREW_REPOSITORY.cd do - cmd = `git status -s Library/Homebrew/ 2> /dev/null`.chomp - if system "/usr/bin/which -s git" and File.directory? '.git' and not cmd.empty? then <<-EOS.undent + unless `git status -s -- Library/Homebrew/ 2>/dev/null`.chomp.empty? then <<-EOS.undent You have uncommitted modifications to Homebrew's core. Unless you know what you are doing, you should run: cd #{HOMEBREW_REPOSITORY} && git reset --hard |
