logging_handler.py: Add CLI check

This commit is contained in:
Mykola Grymalyuk
2023-05-22 12:38:39 -06:00
parent 4c9c7965b6
commit 5f30adab73
3 changed files with 5 additions and 2 deletions
+3
View File
@@ -159,6 +159,9 @@ class InitializeLoggingSupport:
"""
logging.error("Uncaught exception in main thread", exc_info=(type, value, tb))
if self.constants.cli_mode is True:
return
error_msg = f"OpenCore Legacy Patcher encountered the following internal error:\n\n"
error_msg += f"{type.__name__}: {value}"
if tb: