mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-20 02:34:33 +10:00
Use full path and arguments for subprocess
This commit is contained in:
@@ -1110,7 +1110,7 @@ Hardware Information:
|
||||
value_type = "-bool"
|
||||
|
||||
logging.info(f"Updating System Defaults: {variable} = {value} ({value_type})")
|
||||
subprocess.run(["defaults", "write", "-g", variable, value_type, str(value)])
|
||||
subprocess.run(["/usr/bin/defaults", "write", "-globalDomain", variable, value_type, str(value)])
|
||||
|
||||
|
||||
def _find_parent_for_key(self, key: str) -> str:
|
||||
@@ -1256,7 +1256,7 @@ Hardware Information:
|
||||
|
||||
|
||||
def _get_system_settings(self, variable) -> bool:
|
||||
result = subprocess.run(["defaults", "read", "-g", variable], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
result = subprocess.run(["/usr/bin/defaults", "read", "-globalDomain", variable], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
if result.returncode == 0:
|
||||
try:
|
||||
return bool(int(result.stdout.decode().strip()))
|
||||
|
||||
Reference in New Issue
Block a user