mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 05:23:24 +00:00
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 <jh@discordapp.com>
This commit is contained in:
commit
870e730dc8
1 changed files with 2 additions and 3 deletions
|
@ -286,9 +286,8 @@ impl CargoWorkspace {
|
||||||
// unclear whether cargo itself supports it.
|
// unclear whether cargo itself supports it.
|
||||||
progress("metadata".to_string());
|
progress("metadata".to_string());
|
||||||
|
|
||||||
let meta = meta.exec().with_context(|| {
|
let meta =
|
||||||
format!("Failed to run `cargo metadata --manifest-path {}`", cargo_toml.display(),)
|
meta.exec().with_context(|| format!("Failed to run `{:?}`", meta.cargo_command()))?;
|
||||||
})?;
|
|
||||||
|
|
||||||
Ok(meta)
|
Ok(meta)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue