From 4b398534839b6967e6d27c73aa57fd8da9f7dc5a Mon Sep 17 00:00:00 2001 From: Austin Schuh Date: Sun, 6 Jul 2025 05:24:09 -0700 Subject: [PATCH] [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 --- wpimath/generate_nanopb.py | 5 ++--- wpimath/generate_quickbuf.py | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/wpimath/generate_nanopb.py b/wpimath/generate_nanopb.py index 97af4dfa7c..d8bf6d5b77 100755 --- a/wpimath/generate_nanopb.py +++ b/wpimath/generate_nanopb.py @@ -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: diff --git a/wpimath/generate_quickbuf.py b/wpimath/generate_quickbuf.py index 1774a98006..8b0747b858 100755 --- a/wpimath/generate_quickbuf.py +++ b/wpimath/generate_quickbuf.py @@ -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}",