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: fix OpenCore check #18764

Closed
wants to merge 1 commit into from
Closed
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
9 changes: 4 additions & 5 deletions Library/Homebrew/extend/os/mac/diagnostic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,10 @@
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?
return unless has_opencore
return if ::Hardware::CPU.physical_cpu_arm64?

loaded_kexts = Utils.safe_popen_read("/usr/bin/kmutil", "showloaded")

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

View check run for this annotation

Codecov / codecov/patch

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

Added line #L134 was not covered by tests
return if loaded_kexts.exclude?("FakeSMC") && loaded_kexts.exclude?("VirtualSMC")
Comment on lines +134 to +135
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately this check also flags VMs, so doesn't really work 😢

https://github.com/Homebrew/brew/actions/runs/11816737888/job/32920685713?pr=18764#step:4:14


<<~EOS
You have installed macOS using OpenCore Legacy Patcher.
Expand Down
Loading