Skip to content

Commit

Permalink
fix: fix issue #1145 (#1146)
Browse files Browse the repository at this point in the history
Co-authored-by: qtfkwk <[email protected]>
  • Loading branch information
qtfkwk and qtfkwk authored Aug 22, 2024
1 parent 612981e commit 03b0dc5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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::<String>("exclude") {
ignored_directories.extend(user_ignored.map(|x| x.as_str()));
}
ignored_directories
}
Expand Down

0 comments on commit 03b0dc5

Please sign in to comment.