Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
jasursadikov committed Sep 7, 2024
1 parent 8c4c32a commit 65e08db
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mud.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ def run(self) -> None:
# Filter out repositories if user provided filters
def _filter_repos(self) -> None:
self.repos = self.config.filter_label('ignore', self.config.data, False)
any_filters = False
filtered = {}
branch = None
modified = False
Expand All @@ -172,6 +173,7 @@ def _filter_repos(self) -> None:
if arg.startswith('-'):
arg = sys.argv[1:][index - 1]
if any(arg.startswith(prefix) for prefix in LABEL_PREFIX) or (arg.startswith(prefix) for prefix in NOT_LABEL_PREFIX):
any_filters = True
label = arg.split('=', 1)[1]
include = any(arg.startswith(prefix) for prefix in LABEL_PREFIX)
for path, labels in self.config.filter_label(label, self.repos).items():
Expand All @@ -193,7 +195,7 @@ def _filter_repos(self) -> None:
del sys.argv[index]
continue
break
self.repos = filtered
self.repos = filtered if any_filters else self.repos
directory = os.getcwd()
to_delete = []
for repo in self.repos:
Expand Down

0 comments on commit 65e08db

Please sign in to comment.