mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-21 04:58:42 +00:00
Rm duplicate crate_names
specified on cmdline
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
09c1afe616
commit
caeb49ce33
1 changed files with 6 additions and 0 deletions
|
@ -31,6 +31,9 @@ struct Options {
|
|||
///
|
||||
/// When multiple names are provided, the --version option and any override options are
|
||||
/// unavailable due to ambiguity.
|
||||
///
|
||||
/// If duplicate names are provided, the last one (and their version requirement)
|
||||
/// is kept.
|
||||
#[clap(help_heading = "Package selection", value_name = "crate[@version]")]
|
||||
crate_names: Vec<CrateName>,
|
||||
|
||||
|
@ -246,6 +249,9 @@ async fn entry(jobserver_client: LazyJobserverClient) -> Result<()> {
|
|||
}
|
||||
}
|
||||
|
||||
// Remove duplicate crate_name, keep the last one
|
||||
let crate_names = CrateName::dedup(crate_names);
|
||||
|
||||
let cli_overrides = PkgOverride {
|
||||
pkg_url: opts.pkg_url.take(),
|
||||
pkg_fmt: opts.pkg_fmt.take(),
|
||||
|
|
Loading…
Add table
Reference in a new issue