From bdfc65e51dee781f52ebd25d311bd2494c54feef Mon Sep 17 00:00:00 2001 From: Alex Domingo Date: Mon, 23 Dec 2024 01:14:49 +0100 Subject: [PATCH] run_shell_cmd with QA always need pipe on stdin --- easybuild/tools/run.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/easybuild/tools/run.py b/easybuild/tools/run.py index c327930a8d..78051c9ff3 100644 --- a/easybuild/tools/run.py +++ b/easybuild/tools/run.py @@ -496,7 +496,7 @@ def to_cmd_str(cmd): executable, shell = None, False stderr_handle = subprocess.PIPE if split_stderr else subprocess.STDOUT - stdin_handle = subprocess.PIPE if stdin else None + stdin_handle = subprocess.PIPE if stdin or qa_patterns else None log_msg = f"Running {interactive_msg}shell command '{cmd_str}' in {work_dir}" if thread_id: @@ -514,9 +514,7 @@ def to_cmd_str(cmd): if qa_patterns: # make stdout, stderr, stdin non-blocking files - channels = [proc.stdout] - if stdin: - channels.append(proc.stdin) + channels = [proc.stdout, proc.stdin] if split_stderr: channels.append(proc.stderr)