project_model: print full cargo command if it fails to run

This commit is contained in:
Jake Heinz 2021-11-21 01:18:42 +00:00
parent 4566414789
commit 03eb9f3abb

View file

@ -286,9 +286,8 @@ impl CargoWorkspace {
// 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)
}