From f2bedca73430a2cf39c362fccc546704988f8d2a Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Tue, 4 Oct 2022 20:08:47 -0600 Subject: [PATCH] sys_patch.py: Move kdk check higher --- resources/sys_patch.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/sys_patch.py b/resources/sys_patch.py index 0afc206d6..df195919a 100644 --- a/resources/sys_patch.py +++ b/resources/sys_patch.py @@ -123,6 +123,8 @@ class PatchSysVolume: raise Exception(f"Unable to download KDK: {error_msg}") sys_patch_helpers.sys_patch_helpers(self.constants).install_kdk() + kdk_path = sys_patch_helpers.sys_patch_helpers(self.constants).determine_kdk_present(match_closest=True, override_build=downloaded_kdk) + oclp_plist = Path("/System/Library/CoreServices/OpenCore-Legacy-Patcher.plist") if (Path(self.mount_location) / Path("System/Library/Extensions/System.kext/PlugIns/Libkern.kext/Libkern")).exists() and oclp_plist.exists(): # KDK was already merged, check if the KDK used is the same as the one we're using @@ -136,7 +138,6 @@ class PatchSysVolume: except: pass - kdk_path = sys_patch_helpers.sys_patch_helpers(self.constants).determine_kdk_present(match_closest=True, override_build=downloaded_kdk) if kdk_path is None: print(f"- Unable to find Kernel Debug Kit: {downloaded_kdk}") raise Exception("Unable to find Kernel Debug Kit")