From d0a7fdcbaf51d7a6d028373e010c607a6223d0bf Mon Sep 17 00:00:00 2001 From: Sean Albito Date: Sun, 12 Jul 2020 10:49:03 -0700 Subject: [PATCH] Use subprocess to find path to iasl --- Scripts/dsdt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Scripts/dsdt.py b/Scripts/dsdt.py index beafee4..2c73ad7 100644 --- a/Scripts/dsdt.py +++ b/Scripts/dsdt.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # 0.0.0 -import os, tempfile, shutil, plistlib, sys, binascii, zipfile, getpass +import os, tempfile, shutil, plistlib, sys, binascii, zipfile, getpass, subprocess sys.path.append(os.path.abspath(os.path.dirname(os.path.realpath(__file__)))) import run, downloader, utils @@ -83,7 +83,7 @@ def check_iasl(self): if sys.platform == "win32": target = os.path.join(os.path.dirname(os.path.realpath(__file__)), "iasl.exe") else: - target = os.path.join(os.path.dirname(os.path.realpath(__file__)), "iasl") + target = subprocess.run(["which", "iasl"], text=True, stdout=subprocess.PIPE).stdout.strip() if not os.path.exists(target): # Need to download temp = tempfile.mkdtemp()