Warn on empty filters

Closes #29
This commit is contained in:
2022-12-12 15:43:01 +01:00
parent 38bba1472e
commit 23fc942db7
4 changed files with 23 additions and 1 deletions

View File

@@ -55,6 +55,10 @@ fn main() {
let filter =
provider::Filter::new(args.users, args.groups, args.owner, args.access);
if filter.empty() {
print_warning("You did not specify any filters, so no repos will match");
}
let worktree = args.worktree == "true";
let repos = match args.provider {
@@ -278,6 +282,10 @@ fn main() {
filters.access.unwrap_or(false),
);
if filter.empty() {
print_warning("You did not specify any filters, so no repos will match");
}
let repos = match config.provider {
provider::RemoteProvider::Github => {
match match provider::Github::new(filter, token, config.api_url) {
@@ -383,6 +391,10 @@ fn main() {
let filter =
provider::Filter::new(args.users, args.groups, args.owner, args.access);
if filter.empty() {
print_warning("You did not specify any filters, so no repos will match");
}
let worktree = args.worktree == "true";
let repos = match args.provider {