diff --git a/.github/scripts/run_with_env_secrets.py b/.github/scripts/run_with_env_secrets.py index 0a5a1c7868..7f6d4b456a 100644 --- a/.github/scripts/run_with_env_secrets.py +++ b/.github/scripts/run_with_env_secrets.py @@ -7,12 +7,12 @@ def run_cmd_or_die(cmd): - print(f"Running command: {cmd}") + print(f"Running command: {cmd}", file=sys.stderr) p = subprocess.Popen( "/bin/bash", stdout=subprocess.PIPE, stdin=subprocess.PIPE, - stderr=subprocess.STDOUT, + stderr=subprocess.STDERR, bufsize=1, universal_newlines=True, errors="backslashreplace", @@ -26,12 +26,12 @@ def run_cmd_or_die(cmd): while p.poll() is None: line = p.stdout.readline() if line: - print(line, end="") + print(line, end="", file=sys.stderr) result += line # Read any remaining output for line in p.stdout: - print(line, end="") + print(line, end="", file=sys.stderr) result += line exit_code = p.returncode