Skip to content

let cargo install accept the desired binary with the --bin flag. #10363

Open
@DrRuhe

Description

@DrRuhe

Problem

When working with projects that contain multiple binaries, cargo run and cargo build require the user to specify which binary they want via the --bin flag.

cargo install however ignores this flag completely, and asks the user to specify the binary they want when running cargo install --bin name

Proposed Solution

Accept a binary selection via the --bin flag

Notes

The Error message is not very helpful:

error: multiple packages with binaries found: binary-one, binary-two. When installing a git repository, cargo will always search the entire repo for any Cargo.toml. Please specify which to install.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-installS-triageStatus: This issue is waiting on initial triage.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions