Skip to content

Commit 2430a85

Browse files
doc: add error message for wit-bindgen-test c (#1211)
1 parent 46c8afc commit 2430a85

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

crates/test/src/c.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,14 @@ fn prepare(runner: &mut Runner<'_>, compiler: PathBuf) -> Result<()> {
111111
super::write_if_different(&dir.join("test.c"), "int main() { return 0; }")?;
112112

113113
println!("Testing if `{}` works...", compiler.display());
114-
runner.run_command(Command::new(compiler).current_dir(&dir).arg("test.c"))?;
114+
runner
115+
.run_command(Command::new(&compiler).current_dir(&dir).arg("test.c"))
116+
.inspect_err(|_| {
117+
eprintln!(
118+
"Error: failed to find `{}`. Hint: pass `--wasi-sdk-path` or set `WASI_SDK_PATH`",
119+
compiler.display()
120+
);
121+
})?;
115122

116123
Ok(())
117124
}

0 commit comments

Comments
 (0)