Skip to content

Commit

Permalink
Synchronous code is fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
jasursadikov committed Sep 10, 2024
1 parent 13991bb commit 6e6e629
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def _filter_repos(self) -> None:
arg = sys.argv[index]
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):
if any(arg.startswith(prefix) for prefix in LABEL_PREFIX) or any(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)
Expand Down
4 changes: 2 additions & 2 deletions runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,11 @@ def run_ordered(self, repos: List[str], command: [str]) -> None:
command_str = ' '.join(command)
for path in repos:
result = subprocess.run(command_str, shell=True, cwd=path, capture_output=True, text=True)
print(f'{self._get_formatted_path(path)}{RESET} {command_str}{RESET} {RED + utils.GLYPHS["failed"] if result.stderr else GREEN + utils.GLYPHS["finished"]}{RESET}')
print(f'{self._get_formatted_path(path)}{RESET} | {BOLD}{command_str}{RESET} {RED + utils.GLYPHS["failed"] if result.stderr else GREEN + utils.GLYPHS["finished"]} {f"{RESET}|{RED} Code: {BOLD}{result.returncode}{RESET}" if result.stderr else ""} {RESET}')
if result.stdout and not result.stdout.strip().isspace():
print(result.stdout.strip())
if result.stderr and not result.stderr.strip().isspace():
print(result.stderr.strip())
print(f'{RED}{result.stderr.strip()}{RESET}')

# `mud <COMMAND>` when run_async = 1 and run_table = 0
async def run_async(self, repos: List[str], command: List[str]) -> None:
Expand Down

0 comments on commit 6e6e629

Please sign in to comment.