mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2024-12-18 20:17:50 +00:00
Update update_script.py
This commit is contained in:
parent
189fa0fb73
commit
c33ae84156
@ -38,11 +38,15 @@ def run_git_pull():
|
||||
error_message = f"Failed to update the code: {str(e)}"
|
||||
ASCIIColors.error(error_message)
|
||||
show_error_dialog(error_message)
|
||||
return False
|
||||
|
||||
print("Updating submodules")
|
||||
try:
|
||||
repo.git.submodule('update', '--init', '--recursive', '--force')
|
||||
except Exception as ex:
|
||||
error_message = f"Couldn't update submodules: {str(ex)}"
|
||||
ASCIIColors.error(error_message)
|
||||
show_error_dialog(error_message)
|
||||
try:
|
||||
# Checkout the main branch on each submodule
|
||||
for submodule in repo.submodules:
|
||||
try:
|
||||
@ -55,7 +59,11 @@ def run_git_pull():
|
||||
print(f"Couldn't update submodule {submodule}: {str(ex)}")
|
||||
|
||||
execution_path = Path(os.getcwd())
|
||||
|
||||
except Exception as ex:
|
||||
error_message = f"Couldn't update submodules: {str(ex)}"
|
||||
ASCIIColors.error(error_message)
|
||||
show_error_dialog(error_message)
|
||||
try:
|
||||
# Update lollms_core
|
||||
ASCIIColors.info("Updating lollms_core")
|
||||
lollms_core_path = execution_path / "lollms_core"
|
||||
@ -71,7 +79,6 @@ def run_git_pull():
|
||||
error_message = f"Couldn't update submodules: {str(ex)}"
|
||||
ASCIIColors.error(error_message)
|
||||
show_error_dialog(error_message)
|
||||
return False
|
||||
|
||||
return True
|
||||
except Exception as e:
|
||||
|
Loading…
Reference in New Issue
Block a user