Skip to content
Snippets Groups Projects
Commit 66dcfcd8 authored by Jack Nagel's avatar Jack Nagel
Browse files

doctor: clean up check_git_status


Signed-off-by: default avatarJack Nagel <jacknagel@gmail.com>
parent 647e7f11
No related branches found
No related tags found
No related merge requests found
...@@ -751,12 +751,13 @@ def check_missing_deps ...@@ -751,12 +751,13 @@ def check_missing_deps
end end
def check_git_status def check_git_status
repo = HOMEBREW_REPOSITORY HOMEBREW_REPOSITORY.cd do
status_cmd = "git --git-dir=#{repo}/.git --work-tree=#{repo} status -s #{repo}/Library/Homebrew" cmd = `git status -s Library/Homebrew/`.chomp
if system "/usr/bin/which -s git" and File.directory? repo+'.git' and not `#{status_cmd}`.empty? if system "/usr/bin/which -s git" and File.directory? '.git' and not cmd.empty?
ohai "You have uncommitted modifications to Homebrew's core." ohai "You have uncommitted modifications to Homebrew's core."
puts "Unless you know what you are doing, you should: git reset --hard" puts "Unless you know what you are doing, you should: git reset --hard"
puts puts
end
end end
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment