Skip to content

Commit af81023

Browse files
committed
symcheck: Print the command to make reproducing errors easier
1 parent 9bd702d commit af81023

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

crates/symbol-check/src/main.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,16 @@ fn main() {
4646
/// Run `cargo build` with the provided additional arguments, collecting the list of created
4747
/// libraries.
4848
fn exec_cargo_with_args(args: &[&str]) -> Vec<PathBuf> {
49-
let mut cmd = Command::new("cargo")
50-
.arg("build")
49+
let mut cmd = Command::new("cargo");
50+
cmd.arg("build")
5151
.arg("--message-format=json")
5252
.args(args)
53-
.stdout(Stdio::piped())
54-
.spawn()
55-
.expect("failed to launch Cargo");
53+
.stdout(Stdio::piped());
5654

57-
let stdout = cmd.stdout.take().unwrap();
55+
println!("running: {cmd:?}");
56+
let mut child = cmd.spawn().expect("failed to launch Cargo");
57+
58+
let stdout = child.stdout.take().unwrap();
5859
let reader = BufReader::new(stdout);
5960
let mut check_files = Vec::new();
6061

@@ -84,7 +85,7 @@ fn exec_cargo_with_args(args: &[&str]) -> Vec<PathBuf> {
8485
}
8586
}
8687

87-
assert!(cmd.wait().expect("failed to wait on Cargo").success());
88+
assert!(child.wait().expect("failed to wait on Cargo").success());
8889

8990
assert!(!check_files.is_empty(), "no compiler_builtins rlibs found");
9091
println!("Collected the following rlibs to check: {check_files:#?}");

0 commit comments

Comments
 (0)