Geal / cargo-real-deps

Cargo subcommand to check which crates are built depending on features
5 stars 3 forks source link

Handle running as Cargo subcommand #1

Open dtolnay opened 3 years ago

dtolnay commented 3 years ago

Typically binaries prefixed with cargo- are intended to function as Cargo subcommands. When Cargo receives a first argument like cargo COMMAND it finds and executes cargo-COMMAND on the path. For example the cargo expand subcommand is implemented via the cargo-expand crate on crates.io which exposes a cargo-expand binary.

It looks like cargo-real-deps fails when run that way:

$ cargo real-deps
error: Found argument 'real-deps' which wasn't expected, or isn't valid in this context

USAGE:
    cargo-real-deps [FLAGS] [OPTIONS] --path <path>

For more information try --help
alpha-tango-kilo commented 2 years ago

Hey dtolnay, I know it's been ages since you opened this issue but just wanted to let you know I've resolved this issue over on the subcommand branch of my fork. I'll request to merge it here if #5 gets merged (as I made this fix on top of that PR), but I'm not sure if this repo's still being maintained in any way