From 7ad6129596aebb8833f3579f3222be03853fd79e Mon Sep 17 00:00:00 2001 From: Wilfred Mallawa Date: Wed, 30 Oct 2024 16:04:44 +1000 Subject: [PATCH] build.rs: warn if cbordiag tools are not found Instead of panicking at built time, just warn about the cbor tools not being found. At run-time, `spdm-utils` will return an error when attempting decode a cbor encoded manifest from a responder. This should not affect a responder as we already have pre-generated manifests checked in the `manifests/` directory. Signed-off-by: Wilfred Mallawa --- build.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.rs b/build.rs index 84f3e92..e47fdd7 100644 --- a/build.rs +++ b/build.rs @@ -157,9 +157,9 @@ fn main() { file.write_all(&pretty_format) .expect("failed to write to `manifest.pretty`"); } - Err(e) => panic!("Ruby script {script} not found : error {}", e), + Err(e) => {println!("\x1b[33mcargo:warning=Ruby script {script} not found : error {}\x1b[0m", e)}, } } - Err(e) => panic!("Ruby script {script} not found : error {}", e), + Err(e) => println!("\x1b[33mcargo:warning=Ruby script {script} not found : error {}\nSkipping fresh manifest generation\x1b[0m", e), } }