From 03eb9f3abb2d3b49160fbe6cae59a33ab00eb645 Mon Sep 17 00:00:00 2001 From: Jake Heinz Date: Sun, 21 Nov 2021 01:18:42 +0000 Subject: [PATCH] project_model: print full cargo command if it fails to run --- crates/project_model/src/cargo_workspace.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/project_model/src/cargo_workspace.rs b/crates/project_model/src/cargo_workspace.rs index 24b7398ee61..85123ed5c57 100644 --- a/crates/project_model/src/cargo_workspace.rs +++ b/crates/project_model/src/cargo_workspace.rs @@ -286,9 +286,8 @@ pub fn fetch_metadata( // unclear whether cargo itself supports it. progress("metadata".to_string()); - let meta = meta.exec().with_context(|| { - format!("Failed to run `cargo metadata --manifest-path {}`", cargo_toml.display(),) - })?; + let meta = + meta.exec().with_context(|| format!("Failed to run `{:?}`", meta.cargo_command()))?; Ok(meta) }