Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os/mac/diagnostic: check for OpenCore #18762

Merged
merged 1 commit into from
Nov 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Library/Homebrew/extend/os/mac/diagnostic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,20 @@
EOS
end

def check_for_opencore
has_opencore =
File.exist?("/Library/PrivilegedHelperTools/com.dortania.opencore-legacy-patcher.privileged-helper")
has_opencore ||= File.exist?("/Library/Application Support/Dortania/OpenCore-Patcher.app")
has_opencore ||= MacOS.pkgutil_info("com.dortania.opencore-legacy-patcher").present?

Check warning on line 135 in Library/Homebrew/extend/os/mac/diagnostic.rb

View check run for this annotation

Codecov / codecov/patch

Library/Homebrew/extend/os/mac/diagnostic.rb#L133-L135

Added lines #L133 - L135 were not covered by tests
return unless has_opencore

<<~EOS

Check warning on line 138 in Library/Homebrew/extend/os/mac/diagnostic.rb

View check run for this annotation

Codecov / codecov/patch

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

Added line #L138 was not covered by tests
You have installed macOS using OpenCore Legacy Patcher.
We do not provide support for this configuration.
#{please_create_pull_requests}
EOS
end

def check_xcode_up_to_date
return unless MacOS::Xcode.outdated?

Expand Down
Loading