From f10cb735e521d2c3517b70439b76871894f00f90 Mon Sep 17 00:00:00 2001 From: "dr.lt.data" Date: Tue, 19 Sep 2023 09:22:18 +0900 Subject: [PATCH] fix: update all error message on win --- __init__.py | 18 +++++++++++++----- git_helper.py | 10 +++++++--- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/__init__.py b/__init__.py index 689259c7..a4fd10fe 100644 --- a/__init__.py +++ b/__init__.py @@ -248,12 +248,20 @@ def __win_check_git_update(path, do_fetch=False, do_update=False): output, _ = process.communicate() output = output.decode('utf-8').strip() - if "CUSTOM NODE CHECK: True" in output: - process.wait() - return True + if do_update: + if "CUSTOM NODE PULL: True" in output: + process.wait() + return True + else: + process.wait() + return False else: - process.wait() - return False + if "CUSTOM NODE CHECK: True" in output: + process.wait() + return True + else: + process.wait() + return False def __win_check_git_pull(path): diff --git a/git_helper.py b/git_helper.py index 4df83e07..48f6e9c4 100644 --- a/git_helper.py +++ b/git_helper.py @@ -50,9 +50,13 @@ def gitpull(path): if repo.is_dirty(): repo.git.stash() - origin = repo.remote(name='origin') - origin.pull(rebase=True) - repo.git.submodule('update', '--init', '--recursive') + try: + origin = repo.remote(name='origin') + origin.pull(rebase=True) + repo.git.submodule('update', '--init', '--recursive') + print("CUSTOM NODE PULL: True") + except Exception as e: + print("CUSTOM NODE PULL: False") repo.close()