Skip to content

argument processing incorrect in cargo subcommand mode #40

@rbtcollins

Description

@rbtcollins

The code that looks for --help in env.args()[1] is in lib.rs in the run function is faulty: when run as cargo build-all-features --help the args vector will look like so:

$ cargo build-all-features --help
Args: Args { inner: ["...\\.cargo\\bin\\cargo-build-all-features.exe", "build-all-features", "--help"] }    Building crate=cargo-all-features features=[]

That is, arg0 is the binary, arg1 is the subcommand name, arg2 is the first argument.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions