From 8be28a2d4f1fa1593bab81e32e465dba35b99448 Mon Sep 17 00:00:00 2001 From: veetaha Date: Sun, 22 Mar 2020 12:01:49 +0200 Subject: ra_cargo_watch: log exit code too --- crates/ra_cargo_watch/src/lib.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'crates/ra_cargo_watch') diff --git a/crates/ra_cargo_watch/src/lib.rs b/crates/ra_cargo_watch/src/lib.rs index 362d32010..7c525c430 100644 --- a/crates/ra_cargo_watch/src/lib.rs +++ b/crates/ra_cargo_watch/src/lib.rs @@ -318,7 +318,11 @@ pub fn run_cargo( 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: // 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), Ok(_) => return Ok(()), -- cgit v1.2.3