fix: correct update command

This commit is contained in:
Benex254
2024-08-18 15:29:54 +03:00
parent 6329730820
commit 4010cfc9c8
2 changed files with 9 additions and 5 deletions

View File

@@ -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, {})

View File

@@ -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")