Skip to content

Commit ee8497b

Browse files
committed
Auto merge of #9582 - hi-rustin:rustin-patch-errors, r=ehuss
Add more details for installing git repository errors close #9422 close #9011 r? `@ehuss`
2 parents 3b17193 + 5e86dd4 commit ee8497b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/cargo/ops/common_for_install_and_uninstall.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,9 @@ where
612612
fn multi_err(kind: &str, mut pkgs: Vec<&Package>) -> String {
613613
pkgs.sort_unstable_by_key(|a| a.name());
614614
format!(
615-
"multiple packages with {} found: {}",
615+
"multiple packages with {} found: {}. When installing a git repository, \
616+
cargo will always search the entire repo for any Cargo.toml. \
617+
Please specify which to install.",
616618
kind,
617619
pkgs.iter()
618620
.map(|p| p.name().as_str())

tests/testsuite/install.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,9 @@ fn multiple_crates_error() {
414414
.with_stderr(
415415
"\
416416
[UPDATING] git repository [..]
417-
[ERROR] multiple packages with binaries found: bar, foo
417+
[ERROR] multiple packages with binaries found: bar, foo. \
418+
When installing a git repository, cargo will always search the entire repo for any Cargo.toml. \
419+
Please specify which to install.
418420
",
419421
)
420422
.run();

0 commit comments

Comments
 (0)