about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTrevor Gross <tmgross@umich.edu>2025-05-29 16:07:54 +0000
committerTrevor Gross <tmgross@umich.edu>2025-05-29 16:12:33 +0000
commitaf16553893152ba74b0391b02c31f083c2f519b1 (patch)
tree638705d4bd743be30066e99616e2d610285b9815
parent151b1cb04777e1e9630045d52f14bc0e7adf5787 (diff)
downloadrust-af16553893152ba74b0391b02c31f083c2f519b1.tar.gz
rust-af16553893152ba74b0391b02c31f083c2f519b1.zip
symcheck: Print the command to make reproducing errors easier
-rw-r--r--library/compiler-builtins/crates/symbol-check/src/main.rs15
1 files changed, 8 insertions, 7 deletions
diff --git a/library/compiler-builtins/crates/symbol-check/src/main.rs b/library/compiler-builtins/crates/symbol-check/src/main.rs
index 4e6417fdf95..d83cd318d6a 100644
--- a/library/compiler-builtins/crates/symbol-check/src/main.rs
+++ b/library/compiler-builtins/crates/symbol-check/src/main.rs
@@ -46,15 +46,16 @@ fn main() {
 /// Run `cargo build` with the provided additional arguments, collecting the list of created
 /// libraries.
 fn exec_cargo_with_args(args: &[&str]) -> Vec<PathBuf> {
-    let mut cmd = Command::new("cargo")
-        .arg("build")
+    let mut cmd = Command::new("cargo");
+    cmd.arg("build")
         .arg("--message-format=json")
         .args(args)
-        .stdout(Stdio::piped())
-        .spawn()
-        .expect("failed to launch Cargo");
+        .stdout(Stdio::piped());
 
-    let stdout = cmd.stdout.take().unwrap();
+    println!("running: {cmd:?}");
+    let mut child = cmd.spawn().expect("failed to launch Cargo");
+
+    let stdout = child.stdout.take().unwrap();
     let reader = BufReader::new(stdout);
     let mut check_files = Vec::new();
 
@@ -84,7 +85,7 @@ fn exec_cargo_with_args(args: &[&str]) -> Vec<PathBuf> {
         }
     }
 
-    assert!(cmd.wait().expect("failed to wait on Cargo").success());
+    assert!(child.wait().expect("failed to wait on Cargo").success());
 
     assert!(!check_files.is_empty(), "no compiler_builtins rlibs found");
     println!("Collected the following rlibs to check: {check_files:#?}");