From 1493011981623d5388ca868ffab4f727c025494f Mon Sep 17 00:00:00 2001 From: amnweb <16545063+forumwt@users.noreply.github.com> Date: Sun, 12 Jan 2025 18:40:48 +0100 Subject: [PATCH] fix(cli): update version to 1.0.5 and improve log file handling - Bumped YASB_CLI_VERSION to 1.0.5. - Added a check for the existence of the log file, prompting the user to restart YASB if it does not exist. --- src/core/utils/cli.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/utils/cli.py b/src/core/utils/cli.py index af32e9f..7a461a4 100644 --- a/src/core/utils/cli.py +++ b/src/core/utils/cli.py @@ -19,7 +19,7 @@ just_fix_windows_console() YASB_VERSION = BUILD_VERSION -YASB_CLI_VERSION = "1.0.4" +YASB_CLI_VERSION = "1.0.5" OS_STARTUP_FOLDER = os.path.join(os.environ['APPDATA'], r'Microsoft\Windows\Start Menu\Programs\Startup') INSTALLATION_PATH = os.path.abspath(os.path.join(__file__, "../../..")) @@ -167,6 +167,9 @@ def parse_arguments(): elif args.command == 'log': log_file = os.path.join(os.path.expanduser("~"), ".config", "yasb", "yasb.log") + if not os.path.exists(log_file): + print("Log file does not exist. Please restart YASB to generate logs.") + sys.exit(1) try: with open(log_file, 'r') as f: f.seek(0, os.SEEK_END)