From 26f1334036a88d25a59ed0300897e32780d91f4f Mon Sep 17 00:00:00 2001 From: qtfkwk Date: Thu, 22 Aug 2024 12:04:54 -0400 Subject: [PATCH] fix issue https://github.com/XAMPPRocky/tokei/issues/1145 --- src/cli.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index a697bb015..63969da4b 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -79,7 +79,7 @@ impl Cli { Arg::new("exclude") .long("exclude") .short('e') - .num_args(0..) + .action(ArgAction::Append) .help("Ignore all files & directories matching the pattern."), ) .arg( @@ -324,8 +324,8 @@ impl Cli { pub fn ignored_directories(&self) -> Vec<&str> { let mut ignored_directories: Vec<&str> = Vec::new(); - if let Some(user_ignored) = self.matches.get_many::<&str>("exclude") { - ignored_directories.extend(user_ignored); + if let Some(user_ignored) = self.matches.get_many::("exclude") { + ignored_directories.extend(user_ignored.map(|x| x.as_str())); } ignored_directories }