Auto merge of #9582 - hi-rustin:rustin-patch-errors, r=ehuss

Add more details for installing git repository errors

close https://github.com/rust-lang/cargo/issues/9422
close https://github.com/rust-lang/cargo/issues/9011

r? `@ehuss`
This commit is contained in:
bors 2021-06-16 13:03:19 +00:00
commit ee8497b09f
2 changed files with 6 additions and 2 deletions

View File

@ -612,7 +612,9 @@ where
fn multi_err(kind: &str, mut pkgs: Vec<&Package>) -> String {
pkgs.sort_unstable_by_key(|a| a.name());
format!(
"multiple packages with {} found: {}",
"multiple packages with {} found: {}. When installing a git repository, \
cargo will always search the entire repo for any Cargo.toml. \
Please specify which to install.",
kind,
pkgs.iter()
.map(|p| p.name().as_str())

View File

@ -414,7 +414,9 @@ fn multiple_crates_error() {
.with_stderr(
"\
[UPDATING] git repository [..]
[ERROR] multiple packages with binaries found: bar, foo
[ERROR] multiple packages with binaries found: bar, foo. \
When installing a git repository, cargo will always search the entire repo for any Cargo.toml. \
Please specify which to install.
",
)
.run();