Skip to content

Commit

Permalink
fix(cli): update version to 1.0.5 and improve log file handling
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
amnweb committed Jan 12, 2025
1 parent 3e0fdcf commit 1493011
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/utils/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__, "../../.."))
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 1493011

Please sign in to comment.