Skip to content

Commit 8c79a71

Browse files
committed
Add error logging to scripts/print_exported_headers
ghstack-source-id: 5437831 ghstack-comment-id: 3225036431 Pull-Request: #13686
1 parent dd16790 commit 8c79a71

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
@@ -22,7 +22,11 @@
2222

2323
def run(command: List[str]) -> str:
2424
"""Run subprocess and return its output."""
25-
result = subprocess.run(command, capture_output=True, check=True, cwd=BUCK_CWD)
25+
try:
26+
result = subprocess.run(command, capture_output=True, check=True, cwd=BUCK_CWD)
27+
except subprocess.CalledProcessError as ex:
28+
print(f"Subprocess failed. stdout: {ex.stdout}\nstderr: {ex.stderr}")
29+
raise
2630
return result.stdout.decode()
2731

2832

0 commit comments

Comments
 (0)