Skip to content

Commit

Permalink
os/mac/diagnostic: fix OpenCore check
Browse files Browse the repository at this point in the history
  • Loading branch information
carlocab committed Nov 13, 2024
1 parent b421c2f commit b7764b5
Showing 1 changed file with 4 additions and 5 deletions.
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 @@ def check_for_unsupported_macos
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")

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

0 comments on commit b7764b5

Please sign in to comment.