-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #11835 - domsleee:git-install-bin-flag-hint, r=weihanglo
`cargo install --git` multiple packages with binaries found hint ### What does this PR try to resolve? The issues discussed in: #4830 namely this one: > 4. a multiple packages with binaries found error should give users a hint about how to specify a single crate I think improving the error message to provide a suggestion is a simple change that would help a lot of people when this happens, sorry if I'm out of line for just opening a PR here :) ### Before cargo 1.68.0 (115f345 2023-02-26) ![image](https://user-images.githubusercontent.com/14891742/224546157-d9b48bfd-f896-4fd1-9f0a-e04a3ad60ae2.png) ### After ![image](https://user-images.githubusercontent.com/14891742/224546182-d4b451ae-1b28-41b6-9d74-db860532512b.png) ### Additional information I added in a related test documenting existing behaviours * multiple_examples_error: "multiple packages with examples found" (i.e. not "binaries") I added these tests which aren't necessarily related to this PR, but could be considered if the behaviour were to change * `multiple_binaries_deep_select_uses_package_name`: it uses the name, not the path. Is this a problem for crates with the same name? * `multiple_binaries_in_selected_package_installs_all`: so `--bins` is implied when a package is specified? * `multiple_binaries_in_selected_package_with_bin_option_installs_only_one`: demonstrates a use case where `--bin` and `[crate]` are both used
- Loading branch information
Showing
2 changed files
with
97 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters