kdk_handler.py: Enforce full pathing for subprocess

This commit is contained in:
Mykola Grymalyuk
2024-05-10 14:04:51 -06:00
parent 2fe8f4f4c8
commit c456274446

View File

@@ -588,14 +588,13 @@ class KernelDebugKitUtilities:
# TODO: Check whether enough disk space is available
result = utilities.elevated(["installer", "-pkg", kdk_path, "-target", "/"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
result = utilities.elevated(["/usr/sbin/installer", "-pkg", kdk_path, "-target", "/"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
if result.returncode != 0:
logging.info("Failed to install KDK:")
logging.info(result.stdout.decode('utf-8'))
if result.stderr:
logging.info(result.stderr.decode('utf-8'))
return False
return True