From d0418add45c684225d56d9f922f8edd8db7de885 Mon Sep 17 00:00:00 2001 From: Ruoyu Zhong Date: Thu, 14 Nov 2024 00:55:49 +0800 Subject: [PATCH] os/mac/diagnostic: improve OpenCore check This is based on [1]. [1]: https://github.com/Homebrew/brew/pull/18765#issuecomment-2474056438 --- Library/Homebrew/extend/os/mac/diagnostic.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/extend/os/mac/diagnostic.rb b/Library/Homebrew/extend/os/mac/diagnostic.rb index 6cc02f7c0de8e..660c3b0ee1146 100644 --- a/Library/Homebrew/extend/os/mac/diagnostic.rb +++ b/Library/Homebrew/extend/os/mac/diagnostic.rb @@ -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