Skip to content

Commit

Permalink
Merge pull request #18766 from Homebrew/opencore-check-improvement
Browse files Browse the repository at this point in the history
os/mac/diagnostic: improve OpenCore check
  • Loading branch information
MikeMcQuaid authored Nov 13, 2024
2 parents 5a2c264 + d0418ad commit a3c2815
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Library/Homebrew/extend/os/mac/diagnostic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,14 @@ def check_for_unsupported_macos

def check_for_opencore
return if ::Hardware::CPU.physical_cpu_arm64?
return if ENV["CI"]

# https://dortania.github.io/OpenCore-Legacy-Patcher/UPDATE.html#checking-oclp-and-opencore-versions
begin
opencore_version = Utils.safe_popen_read("/usr/sbin/nvram",
"4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:opencore-version").split[1]
return if opencore_version.blank?
oclp_version = Utils.safe_popen_read("/usr/sbin/nvram",
"4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:oclp-version").split[1]
return if opencore_version.blank? || oclp_version.blank?
rescue ErrorDuringExecution
return
end
Expand Down

0 comments on commit a3c2815

Please sign in to comment.