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
|
def check_coretap_integrity
|
||||||
coretap = CoreTap.instance
|
coretap = CoreTap.instance
|
||||||
|
return if !coretap.installed? && EnvConfig.install_from_api?
|
||||||
|
|
||||||
broken_tap(coretap) || examine_git_origin(coretap.path, Homebrew::EnvConfig.core_git_remote)
|
broken_tap(coretap) || examine_git_origin(coretap.path, Homebrew::EnvConfig.core_git_remote)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -722,6 +724,8 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
|
|
||||||
repos.each do |name, path|
|
repos.each do |name, path|
|
||||||
|
next unless path.exist?
|
||||||
|
|
||||||
status = path.cd do
|
status = path.cd do
|
||||||
`git status --untracked-files=all --porcelain 2>/dev/null`
|
`git status --untracked-files=all --porcelain 2>/dev/null`
|
||||||
end
|
end
|
||||||
@ -877,11 +881,13 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
|
|
||||||
def check_deleted_formula
|
def check_deleted_formula
|
||||||
keg_names = Keg.all.map(&:name).uniq
|
kegs = Keg.all
|
||||||
|
|
||||||
deleted_formulae = keg_names.map do |keg_name|
|
deleted_formulae = kegs.map do |keg|
|
||||||
keg_name if Formulary.tap_paths(keg_name).blank?
|
next if !CoreTap.instance.installed? && EnvConfig.install_from_api? && Tab.for_keg(keg).tap.core_tap?
|
||||||
end.compact
|
|
||||||
|
keg.name if Formulary.tap_paths(keg.name).blank?
|
||||||
|
end.compact.uniq
|
||||||
|
|
||||||
return if deleted_formulae.blank?
|
return if deleted_formulae.blank?
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user