Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"cargo install --git" requires a crate name when a workspace has multiple binaries #8958

Closed
teor2345 opened this issue Dec 8, 2020 · 1 comment
Labels
C-bug Category: bug

Comments

@teor2345
Copy link

teor2345 commented Dec 8, 2020

Problem

What I did:

I tried running the command:

cargo install --git https://github.com/ZcashFoundation/zebra --branch main

But I got the error:

    Updating git repository `https://github.com/ZcashFoundation/zebra`
error: multiple packages with binaries found: zebra-utils, zebrad  

I tried:

  • specifying --bin zebrad
  • specifying --bins
  • modifying the default-members in the workspace Cargo.toml to exclude zebra-utils

Then I found the correct command syntax in #7194:

cargo install --git https://github.com/ZcashFoundation/zebra --branch main zebrad

Steps

  1. Run cargo install --git https://github.com/ZcashFoundation/zebra --rev 65e38b3c74eb06b14939448e368848f8ff0598b1

Possible Solution(s)

Here's what I expected:

  1. --bin zebrad should install the binary with that name, if there are multiple packages with binaries
  2. --bins should install all binaries, if there are multiple packages with binaries
  3. if there is only one binary in the workspace default-members, that binary should be installed
  4. a multiple packages with binaries found error should give users a hint about how to specify a single crate

Notes

Output of cargo version:

cargo 1.45.1 

Output of uname -a:

Linux ... 5.4.75 #1-NixOS SMP Thu Nov 5 10:43:38 UTC 2020 x86_64 GNU/Linux 
@teor2345 teor2345 added the C-bug Category: bug label Dec 8, 2020
@ehuss
Copy link
Contributor

ehuss commented Jan 7, 2021

Closing as a duplicate of #4830. These all sound like reasonable suggestions to me, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

2 participants