Merge pull request #18766 from Homebrew/opencore-check-improvement

os/mac/diagnostic: improve OpenCore check
This commit is contained in:
Mike McQuaid 2024-11-13 17:15:52 +00:00 committed by GitHub
commit a3c28153f7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -130,13 +130,14 @@ module OS
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