mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Fix brew doctor
This commit is contained in:
parent
078dcb545f
commit
dd1a36052c
@ -591,6 +591,8 @@ module Homebrew
|
||||
|
||||
def check_coretap_integrity
|
||||
coretap = CoreTap.instance
|
||||
return if !coretap.installed? && EnvConfig.install_from_api?
|
||||
|
||||
broken_tap(coretap) || examine_git_origin(coretap.path, Homebrew::EnvConfig.core_git_remote)
|
||||
end
|
||||
|
||||
@ -722,6 +724,8 @@ module Homebrew
|
||||
end
|
||||
|
||||
repos.each do |name, path|
|
||||
next unless path.exist?
|
||||
|
||||
status = path.cd do
|
||||
`git status --untracked-files=all --porcelain 2>/dev/null`
|
||||
end
|
||||
@ -877,11 +881,13 @@ module Homebrew
|
||||
end
|
||||
|
||||
def check_deleted_formula
|
||||
keg_names = Keg.all.map(&:name).uniq
|
||||
kegs = Keg.all
|
||||
|
||||
deleted_formulae = keg_names.map do |keg_name|
|
||||
keg_name if Formulary.tap_paths(keg_name).blank?
|
||||
end.compact
|
||||
deleted_formulae = kegs.map do |keg|
|
||||
next if !CoreTap.instance.installed? && EnvConfig.install_from_api? && Tab.for_keg(keg).tap.core_tap?
|
||||
|
||||
keg.name if Formulary.tap_paths(keg.name).blank?
|
||||
end.compact.uniq
|
||||
|
||||
return if deleted_formulae.blank?
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user