about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--build_system/utils.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/build_system/utils.rs b/build_system/utils.rs
index 24624cdeab1..9f5e37db35e 100644
--- a/build_system/utils.rs
+++ b/build_system/utils.rs
@@ -197,7 +197,9 @@ pub(crate) fn try_hard_link(src: impl AsRef<Path>, dst: impl AsRef<Path>) {
 
 #[track_caller]
 pub(crate) fn spawn_and_wait(mut cmd: Command) {
-    if !cmd.spawn().unwrap().wait().unwrap().success() {
+    let status = cmd.spawn().unwrap().wait().unwrap();
+    if !status.success() {
+        eprintln!("{cmd:?} exited with status {:?}", status);
         process::exit(1);
     }
 }
@@ -233,6 +235,7 @@ pub(crate) fn spawn_and_wait_with_input(mut cmd: Command, input: String) -> Stri
 
     let output = child.wait_with_output().expect("Failed to read stdout");
     if !output.status.success() {
+        eprintln!("{cmd:?} exited with status {:?}", output.status);
         process::exit(1);
     }