ra_cargo_watch: log exit code too

This commit is contained in:
veetaha 2020-03-22 12:01:49 +02:00
parent 788b29d343
commit 8be28a2d4f

View file

@ -318,7 +318,11 @@ pub fn run_cargo(
Ok(exit_code) if !exit_code.success() && !read_at_least_one_message => { Ok(exit_code) if !exit_code.success() && !read_at_least_one_message => {
// FIXME: Read the stderr to display the reason, see `read2()` reference in PR comment: // FIXME: Read the stderr to display the reason, see `read2()` reference in PR comment:
// https://github.com/rust-analyzer/rust-analyzer/pull/3632#discussion_r395605298 // https://github.com/rust-analyzer/rust-analyzer/pull/3632#discussion_r395605298
format!("the command produced no valid metadata: cargo {}", args.join(" ")) format!(
"the command produced no valid metadata (exit code: {:?}): cargo {}",
exit_code,
args.join(" ")
)
} }
Err(err) => format!("io error: {:?}", err), Err(err) => format!("io error: {:?}", err),
Ok(_) => return Ok(()), Ok(_) => return Ok(()),