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.