From 3d5075fea2e219a179271c9810017c7e38bff6cc Mon Sep 17 00:00:00 2001 From: melMass Date: Fri, 4 Aug 2023 14:44:52 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20shell=20command=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since we always build a string shell should always be true --- install.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/install.py b/install.py index d994dd8..cc756dd 100644 --- a/install.py +++ b/install.py @@ -150,14 +150,12 @@ def enqueue_output(out, queue): def run_command(cmd): if isinstance(cmd, str): shell_cmd = cmd - shell = True elif isinstance(cmd, list): shell_cmd = "" for arg in cmd: if isinstance(arg, Path): arg = arg.as_posix() shell_cmd += f"{arg} " - shell = False else: raise ValueError( "Invalid 'cmd' argument. It must be a string or a list of arguments." @@ -168,7 +166,7 @@ def run_command(cmd): stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True, - shell=shell, + shell=True, ) # Create separate threads to read standard output and standard error streams