Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion scripts/print_exported_headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import json
import os
import subprocess
import sys
from typing import List, Set

# Run buck2 from the same directory (and thus repo) as this script.
Expand All @@ -22,7 +23,14 @@

def run(command: List[str]) -> str:
"""Run subprocess and return its output."""
result = subprocess.run(command, capture_output=True, check=True, cwd=BUCK_CWD)
try:
result = subprocess.run(command, capture_output=True, check=True, cwd=BUCK_CWD)
except subprocess.CalledProcessError as ex:
print(
f"Subprocess failed. stdout: {ex.stdout}\nstderr: {ex.stderr}",
file=sys.stderr,
)
raise
return result.stdout.decode()


Expand Down
Loading