From 8aefaa7582dd1a741fafe987777a657978b98da2 Mon Sep 17 00:00:00 2001 From: Frederik Pfautsch Date: Tue, 17 Dec 2024 14:11:02 +0100 Subject: [PATCH] Get rid of unnecessary bash wrappers in subprocesses.Popen Signed-off-by: Frederik Pfautsch Original-commit: e572bab3ee5aa40f57bdc6e11d6381cad1d1401a --- tools/utils/repeat_fpga_build.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/utils/repeat_fpga_build.py b/tools/utils/repeat_fpga_build.py index 5ededf2..1b03a63 100755 --- a/tools/utils/repeat_fpga_build.py +++ b/tools/utils/repeat_fpga_build.py @@ -374,9 +374,11 @@ def run_fpga_build( cmd_build_num, ) logging.info(f"Running FPGA build command: {cmd}") + my_env = os.environ.copy() with subprocess.Popen( cmd, shell=True, + env=my_env, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, bufsize=1, @@ -460,7 +462,7 @@ def run_ip_build( logging.info(f"Running IP build with command: {cmd}") output = "" with subprocess.Popen( - f'/bin/bash -c "{cmd}"', + cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,