fix: split command string before running subprocess

- use command.split(" ") to convert command to a list before running

🤖
This commit is contained in:
Sebastian Mark 2023-12-21 20:33:30 +01:00
parent 899b1f1c81
commit f889ff5050

View file

@ -32,7 +32,7 @@ def run_subprocess(command: str, workdir: str) -> bool:
bool: False if subprocess fails
"""
try:
log.debug(subprocess.run(command, cwd=workdir, shell=True, text=True))
log.debug(subprocess.run(command.split(" "), cwd=workdir, text=True))
except subprocess.CalledProcessError:
return False