Skip to content
Snippets Groups Projects
Commit c959b372 authored by Max Howell's avatar Max Howell
Browse files

The doctor notices modifications to Homebrew core

Refs Homebrew/homebrew#7525.
parent f1cd284f
No related branches found
No related tags found
No related merge requests found
......@@ -749,6 +749,13 @@ def check_missing_deps
end
end
def check_git_status
if system "/usr/bin/which -s git" and not `git status -s #{HOMEBREW_PREFIX}/Library/Homebrew`.empty?
ohai "You have uncommitted modifications to Homebrew core"
puts "Unless you know what you are doing, you should: git reset --hard"
end
end
module Homebrew extend self
def doctor
old_stdout = $stdout
......@@ -791,6 +798,7 @@ module Homebrew extend self
check_for_other_frameworks
check_tmpdir
check_missing_deps
check_git_status
ensure
$stdout = old_stdout
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