From 76a1cfb0e6de9ed52fbab53fcfdd669f4a680d8b Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Tue, 21 Mar 2023 13:41:28 +0000 Subject: [PATCH] Give an error if any of the wrappers can't find cargo, rustc or rustdoc Fixes #1364 --- scripts/cargo-clif.rs | 2 +- scripts/rustc-clif.rs | 2 +- scripts/rustdoc-clif.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/cargo-clif.rs b/scripts/cargo-clif.rs index 939a1f1ca..e2db7d03a 100644 --- a/scripts/cargo-clif.rs +++ b/scripts/cargo-clif.rs @@ -64,7 +64,7 @@ fn main() { }; #[cfg(unix)] - Command::new("cargo").args(args).exec(); + panic!("Failed to spawn cargo: {}", Command::new("cargo").args(args).exec()); #[cfg(not(unix))] std::process::exit( diff --git a/scripts/rustc-clif.rs b/scripts/rustc-clif.rs index b9bba7f2e..25156f05e 100644 --- a/scripts/rustc-clif.rs +++ b/scripts/rustc-clif.rs @@ -30,7 +30,7 @@ fn main() { env::set_var("RUSTUP_TOOLCHAIN", env!("TOOLCHAIN_NAME")); #[cfg(unix)] - Command::new("rustc").args(args).exec(); + panic!("Failed to spawn rustc: {}", Command::new("rustc").args(args).exec()); #[cfg(not(unix))] std::process::exit( diff --git a/scripts/rustdoc-clif.rs b/scripts/rustdoc-clif.rs index 167631eaf..6081dddb2 100644 --- a/scripts/rustdoc-clif.rs +++ b/scripts/rustdoc-clif.rs @@ -30,7 +30,7 @@ fn main() { env::set_var("RUSTUP_TOOLCHAIN", env!("TOOLCHAIN_NAME")); #[cfg(unix)] - Command::new("rustdoc").args(args).exec(); + panic!("Failed to spawn rustdoc: {}", Command::new("rustdoc").args(args).exec()); #[cfg(not(unix))] std::process::exit(