Skip to content

Commit 3c75a2d

Browse files
committed
try printing to stderr
[ghstack-poisoned]
1 parent 49b0604 commit 3c75a2d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/print_exported_headers.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import json
1515
import os
1616
import subprocess
17+
import sys
1718
from typing import List, Set
1819

1920
# Run buck2 from the same directory (and thus repo) as this script.
@@ -25,7 +26,10 @@ def run(command: List[str]) -> str:
2526
try:
2627
result = subprocess.run(command, capture_output=True, check=True, cwd=BUCK_CWD)
2728
except subprocess.CalledProcessError as ex:
28-
print(f"Subprocess failed. stdout: {ex.stdout}\nstderr: {ex.stderr}")
29+
print(
30+
f"Subprocess failed. stdout: {ex.stdout}\nstderr: {ex.stderr}",
31+
file=sys.stderr,
32+
)
2933
raise
3034
return result.stdout.decode()
3135

0 commit comments

Comments
 (0)