Skip to content

Commit 8be28a2

Browse files
committed
ra_cargo_watch: log exit code too
1 parent 788b29d commit 8be28a2

File tree

1 file changed

+5
-1
lines changed
  • crates/ra_cargo_watch/src

1 file changed

+5
-1
lines changed

crates/ra_cargo_watch/src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,11 @@ pub fn run_cargo(
318318
Ok(exit_code) if !exit_code.success() && !read_at_least_one_message => {
319319
// FIXME: Read the stderr to display the reason, see `read2()` reference in PR comment:
320320
// https://github.com/rust-analyzer/rust-analyzer/pull/3632#discussion_r395605298
321-
format!("the command produced no valid metadata: cargo {}", args.join(" "))
321+
format!(
322+
"the command produced no valid metadata (exit code: {:?}): cargo {}",
323+
exit_code,
324+
args.join(" ")
325+
)
322326
}
323327
Err(err) => format!("io error: {:?}", err),
324328
Ok(_) => return Ok(()),

0 commit comments

Comments
 (0)