From 9f4a5e4b48b51b063604301522aa3d494eba74c4 Mon Sep 17 00:00:00 2001 From: steven-omaha <35634100+steven-omaha@users.noreply.github.com> Date: Tue, 23 May 2023 17:43:06 +0200 Subject: [PATCH] fix: arg parsing The 'pacdef group import' argument was called 'files', while we expected it to be called 'groups'. --- crates/pacdef_core/src/args/cli.rs | 2 +- crates/pacdef_core/src/args/parsing.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/pacdef_core/src/args/cli.rs b/crates/pacdef_core/src/args/cli.rs index 857580a..6a8bd3f 100644 --- a/crates/pacdef_core/src/args/cli.rs +++ b/crates/pacdef_core/src/args/cli.rs @@ -35,7 +35,7 @@ fn get_group_cmd() -> Command { .about("import one or more group files") .arg_required_else_help(true) .arg( - Arg::new("files") + Arg::new("groups") .num_args(1..) .required(true) .help("the file to import as group"), diff --git a/crates/pacdef_core/src/args/parsing.rs b/crates/pacdef_core/src/args/parsing.rs index 5a54f14..eacd2bb 100644 --- a/crates/pacdef_core/src/args/parsing.rs +++ b/crates/pacdef_core/src/args/parsing.rs @@ -61,6 +61,7 @@ fn get_edit(args: &clap::ArgMatches) -> Edit { } fn get_groups(args: &clap::ArgMatches) -> Groups { + dbg!(&args); Groups( args.get_many::("groups") .expect(ARGS_CONSISTENT)