From edfadd12eb8ea22d2b46fc2d7732f1a17538a21a Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Wed, 21 Aug 2024 14:26:40 -0400 Subject: [PATCH] Hacky fix to #5582 Signed-off-by: Edward Z. Yang ghstack-source-id: 00eceb62f5cf9540193db3eb9a91c40f76a4bc24 ghstack-comment-id: 2302706756 Pull Request resolved: https://github.com/pytorch/test-infra/pull/5583 --- .github/scripts/run_with_env_secrets.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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