From e8a6f45329da59116b557315926b730bc5f826e1 Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Mon, 23 Jan 2023 09:31:36 -0700 Subject: [PATCH] sys_patch_helpers.py: Print errors --- resources/sys_patch/sys_patch_helpers.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/resources/sys_patch/sys_patch_helpers.py b/resources/sys_patch/sys_patch_helpers.py index 6d9f14b21..3bed809fe 100644 --- a/resources/sys_patch/sys_patch_helpers.py +++ b/resources/sys_patch/sys_patch_helpers.py @@ -92,7 +92,10 @@ class sys_patch_helpers: utilities.process_status(subprocess.run(["cp", f"{mount_point}/KernelDebugKit.pkg", self.constants.payload_path], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)) result = utilities.elevated(["installer", "-pkg", kdk_dst_path, "-target", "/"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) if result.returncode != 0: - print(f"- Failed to install KDK: {result.stdout}") + print("- Failed to install KDK:") + print(result.stdout.decode('utf-8')) + print(result.stderr.decode('utf-8')) + utilities.elevated(["hdiutil", "detach", mount_point], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) raise Exception("Failed to install KDK") utilities.process_status(utilities.elevated(["rm", kdk_dst_path], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))