Skip to content

Commit

Permalink
disable self-update when run as a script
Browse files Browse the repository at this point in the history
  • Loading branch information
n8marti authored and thw26 committed Apr 1, 2024
1 parent c6c4455 commit cc10a4e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 4 additions & 1 deletion gui_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,10 @@ def update_app_button(self, evt=None):
def update_latest_lli_release_button(self, evt=None):
status, reason = utils.compare_logos_linux_installer_version()
msg = None
if status == 0:
if utils.get_runmode() != 'binary':
state = 'disabled'
msg = "This button is disabled. Can't run self-update from script."
elif status == 0:
state = '!disabled'
elif status == 1:
state = 'disabled'
Expand Down
2 changes: 1 addition & 1 deletion tui_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def control_panel_app():
"Restore Data"]
options_exit = ["Exit"]
if utils.file_exists(config.LOGOS_EXE):
if config.LLI_LATEST_VERSION:
if config.LLI_LATEST_VERSION and utils.get_runmode() == 'binary':
logging.debug("Checking if Logos Linux Installers needs updated.")
status, error_message = utils.compare_logos_linux_installer_version()
if status == 0:
Expand Down
4 changes: 3 additions & 1 deletion utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1423,7 +1423,9 @@ def set_appimage_symlink(app=None):
def update_to_latest_lli_release():
status, _ = compare_logos_linux_installer_version()

if status == 0:
if get_runmode() != 'binary':
logging.error("Can't update LogosLinuxInstaller when run as a script.")
elif status == 0:
update_lli_binary()
elif status == 1:
logging.debug(f"{config.LLI_TITLE} is already at the latest version.")
Expand Down

0 comments on commit cc10a4e

Please sign in to comment.