chore(repo/find): Exlude paths based on regex

This commit is contained in:
Baptiste Roux
2023-01-14 14:40:11 +01:00
parent 9b4ed2837e
commit 956b172426
3 changed files with 27 additions and 4 deletions

View File

@@ -63,6 +63,14 @@ pub struct FindLocalArgs {
#[clap(help = "The path to search through")]
pub path: String,
#[clap(
short,
long,
help = "Exclude repositories that match the given regex",
name = "REGEX"
)]
pub exclude: Option<String>,
#[clap(
value_enum,
short,

View File

@@ -199,7 +199,7 @@ fn main() {
}
};
let (found_repos, warnings) = match find_in_tree(&path) {
let (found_repos, warnings) = match find_in_tree(&path, &args.exclude) {
Ok((repos, warnings)) => (repos, warnings),
Err(error) => {
print_error(&error);