Skip to content

Commit 2c20e3b

Browse files
committed
os/mac/diagnostic: check for OpenCore
This configuration is not supported. Let's make `brew doctor` complain about it.
1 parent acb3675 commit 2c20e3b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Library/Homebrew/extend/os/mac/diagnostic.rb

+14
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,20 @@ def check_for_unsupported_macos
128128
EOS
129129
end
130130

131+
def check_for_opencore
132+
has_opencore =
133+
File.exist?("/Library/PrivilegedHelperTools/com.dortania.opencore-legacy-patcher.privileged-helper")
134+
has_opencore ||= File.exist?("/Library/Application Support/Dortania/OpenCore-Patcher.app")
135+
has_opencore ||= MacOS.pkgutil_info("com.dortania.opencore-legacy-patcher").present?
136+
return unless has_opencore
137+
138+
<<~EOS
139+
You have installed macOS using OpenCore Legacy Patcher.
140+
We do not provide support for this configuration.
141+
#{please_create_pull_requests}
142+
EOS
143+
end
144+
131145
def check_xcode_up_to_date
132146
return unless MacOS::Xcode.outdated?
133147

0 commit comments

Comments
 (0)