From 3e584701c5dffebcd0bd320585f02a0c48e495a3 Mon Sep 17 00:00:00 2001 From: Fredrik Hallin Date: Sat, 28 Nov 2026 20:52:45 +0100 Subject: [PATCH] Fail the build without panic! when SOUNDCRAFT_REQUIRE_WINRES is set The workspace denies clippy::panic, build scripts included. Print the reason on stderr and exit 1 instead. Co-Authored-By: Claude Sonnet 5.5 --- apps/soundcraft/build.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/soundcraft/build.rs b/apps/soundcraft/build.rs index f4d5b4ced..e893ae29c 100644 --- a/apps/soundcraft/build.rs +++ b/apps/soundcraft/build.rs @@ -67,7 +67,10 @@ fn main() { } if let Err(e) = res.compile() { if std::env::var_os("SOUNDCRAFT_REQUIRE_WINRES").is_some() { - panic!("embedding Windows resources failed: {e}"); + // The workspace denies `clippy::panic`, build scripts included: stop the build with + // the reason on stderr. + eprintln!("embedding Windows resources failed: {e}"); + std::process::exit(1); } println!("cargo:warning=soundcraft.exe built without icon/version resources: {e}"); }