]> git.proxmox.com Git - cargo.git/commitdiff
Add more details when installing git repository errors
authorhi-rustin <rustin.liu@gmail.com>
Mon, 14 Jun 2021 06:41:49 +0000 (14:41 +0800)
committerhi-rustin <rustin.liu@gmail.com>
Mon, 14 Jun 2021 06:41:49 +0000 (14:41 +0800)
src/cargo/ops/common_for_install_and_uninstall.rs
tests/testsuite/install.rs

index b6f53a83f6422a53a63e45655468e7e6cc486562..444e57cfddb612ad8283d9b8a9d0b7f2a20a8da6 100644 (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())
index e8891e21b2a5c5e59a5e884bea46653291dcfb3a..c2d3eef6fe4d20126569af5b2fcd33c360609df5 100644 (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();