From c8887fdee0fdaabcef999cd8b2d4c01748e11aac Mon Sep 17 00:00:00 2001 From: Federico Terzi Date: Fri, 13 Aug 2021 22:22:17 +0200 Subject: [PATCH] fix(misc): make build script fail if cargo fails --- scripts/build_binary.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/build_binary.rs b/scripts/build_binary.rs index 4ba62d4..8548f06 100644 --- a/scripts/build_binary.rs +++ b/scripts/build_binary.rs @@ -72,5 +72,8 @@ fn main() { } let mut handle = cmd.spawn().expect("cargo build failed"); - handle.wait(); + let result = handle.wait().expect("unable to read cargo exit status"); + if !result.success() { + panic!("cargo build failed"); + } }