cargo-local-registry icon indicating copy to clipboard operation
cargo-local-registry copied to clipboard

adopting clap broke `cargo local-registry` subcommand syntax

Open cormacrelf opened this issue 5 months ago • 1 comments

You can still use it as cargo-local-registry. But it no longer works as a cargo subcommand. Cargo invokes it as

cargo-local-registry local-registry --sync blah.lock vendor/

... which means the vendor/ is treated as an extra argument and clap fails with

error: unexpected argument 'vendor' found

Usage: cargo-local-registry [OPTIONS] <PATH>

For more information, try '--help'.

See https://github.com/clap-rs/clap/tree/master/examples for how it's done. I don't know if you can support both invocation styles using clap.

Edit: thought this was released! It wasn't released in 0.2.7.

cormacrelf avatar Sep 04 '24 07:09 cormacrelf