dhovart / cargo-local-registry

A cargo subcommand to manage local registries
Apache License 2.0
150 stars 18 forks source link

adopting clap broke `cargo local-registry` subcommand syntax #192

Open cormacrelf opened 2 months ago

cormacrelf commented 2 months ago

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.

dhovart commented 2 months ago

Hello, this was merged on master but not released yet. I'll have a look at this later this week, thanks for the bug report