You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)

### After

### 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
0 commit comments