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 }