From 4010cfc9c8292f33d895053396d81dc9bdfdaaf6 Mon Sep 17 00:00:00 2001 From: Benex254 Date: Sun, 18 Aug 2024 15:29:54 +0300 Subject: [PATCH] fix: correct update command --- fastanime/cli/app_updater.py | 6 +++--- fastanime/cli/commands/update.py | 8 ++++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/fastanime/cli/app_updater.py b/fastanime/cli/app_updater.py index 53276b1..079aaaf 100644 --- a/fastanime/cli/app_updater.py +++ b/fastanime/cli/app_updater.py @@ -39,11 +39,11 @@ def check_for_updates(): and remote_tag[1] == local_tag[1] ) ): - is_update = True + is_latest = False else: - is_update = False + is_latest = True - return (is_update, release_json) + return (is_latest, release_json) else: print(request.text) return (False, {}) diff --git a/fastanime/cli/commands/update.py b/fastanime/cli/commands/update.py index a4fb01c..d78b66f 100644 --- a/fastanime/cli/commands/update.py +++ b/fastanime/cli/commands/update.py @@ -24,8 +24,8 @@ def update( console.print(body) if check: - is_update, github_release_data = check_for_updates() - if is_update: + is_latest, github_release_data = check_for_updates() + if not is_latest: print( f"You are running an older version ({__version__}) of fastanime please update to get the latest features" ) @@ -36,3 +36,7 @@ def update( else: success, github_release_data = update_app() _print_release(github_release_data) + if success: + print("Successfully updated") + else: + print("failed to update")