Skip to content

Commit 3d7155e

Browse files
committed
refactor: close the appropriate handler before exiting
1 parent 0dd0343 commit 3d7155e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/macaron/__main__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,10 @@ def main(argv: list[str] | None = None) -> None:
638638

639639
perform_action(args)
640640
finally:
641-
st_handler.close()
641+
if args.disable_rich_output:
642+
st_handler.close()
643+
else:
644+
rich_handler.close()
642645

643646

644647
def _get_token_from_dict_or_env(token: str, token_dict: dict[str, str]) -> str:

0 commit comments

Comments
 (0)