[build] Check results of subprocess.run in wpimath/generate_quickbuf.py (#8069)

The generator was calling a binary of the wrong architecture and failing
internally, but passing the build (incorrectly).  Explode right away.

Signed-off-by: Austin Schuh <austin.linux@gmail.com>
This commit is contained in:
Austin Schuh
2025-07-06 05:24:09 -07:00
committed by GitHub
parent c3b327d57b
commit 4b39853483
2 changed files with 3 additions and 4 deletions

View File

@@ -19,7 +19,7 @@ def generate_nanopb(nanopb: Path, output_directory: Path, proto_dir: Path):
proto_files = proto_dir.glob("*.proto")
for path in proto_files:
absolute_filename = path.absolute()
subprocess.run(
subprocess.check_call(
[
sys.executable,
nanopb,
@@ -28,8 +28,7 @@ def generate_nanopb(nanopb: Path, output_directory: Path, proto_dir: Path):
"-S.cpp",
"-e.npb",
absolute_filename,
],
check=True,
]
)
java_files = (output_directory).glob("*")
for java_file in java_files:

View File

@@ -15,7 +15,7 @@ def generate_quickbuf(
proto_files = proto_dir.glob("*.proto")
for path in proto_files:
absolute_filename = path.absolute()
subprocess.run(
subprocess.check_call(
[
protoc,
f"--plugin=protoc-gen-quickbuf={quickbuf_plugin}",