Skip to content

Commit

Permalink
Hacky fix to #5582
Browse files Browse the repository at this point in the history
Signed-off-by: Edward Z. Yang <[email protected]>

ghstack-source-id: 00eceb62f5cf9540193db3eb9a91c40f76a4bc24
ghstack-comment-id: 2302706756
Pull Request resolved: #5583
  • Loading branch information
ezyang committed Aug 21, 2024
1 parent 0c3a263 commit edfadd1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/scripts/run_with_env_secrets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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
Expand Down

0 comments on commit edfadd1

Please sign in to comment.