Skip to content

Commit 870e730

Browse files
bors[bot]jhgg
andauthored
Merge #10824
10824: project_model: print full cargo command if cargo metadata fails to run r=Veykril a=jhgg well, `Command` implements a sensible `Debug` which *roughly* does what we want to do. Unfortunately it's got a bit of a quote situation, So it'd output something like `"cargo" "metadata" "--format-version" "1" "--features" "foo,bar,baz"`. Which although is a bit verbose with the quotes, it's at the very least, not entirely incorrect/misleading. fixes #10797 Co-authored-by: Jake Heinz <[email protected]>
2 parents 4ca6233 + 03eb9f3 commit 870e730

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

crates/project_model/src/cargo_workspace.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,9 +286,8 @@ impl CargoWorkspace {
286286
// unclear whether cargo itself supports it.
287287
progress("metadata".to_string());
288288

289-
let meta = meta.exec().with_context(|| {
290-
format!("Failed to run `cargo metadata --manifest-path {}`", cargo_toml.display(),)
291-
})?;
289+
let meta =
290+
meta.exec().with_context(|| format!("Failed to run `{:?}`", meta.cargo_command()))?;
292291

293292
Ok(meta)
294293
}

0 commit comments

Comments
 (0)