fixed: snapshot - robust resolving the remote url

This commit is contained in:
Dr.Lt.Data 2025-01-13 06:37:47 +09:00
parent c779573204
commit f37f5b0ae2
2 changed files with 16 additions and 3 deletions

View File

@ -41,7 +41,7 @@ import manager_downloader
from node_package import InstalledNodePackage
version_code = [3, 7, 1]
version_code = [3, 7, 2]
version_str = f"V{version_code[0]}.{version_code[1]}" + (f'.{version_code[2]}' if len(version_code) > 2 else '')
@ -2463,8 +2463,21 @@ async def get_current_snapshot():
cnr_custom_nodes[info['id']] = info['ver']
else:
repo = git.Repo(fullpath)
if repo.head.is_detached:
remote_name = get_remote_name(repo)
else:
current_branch = repo.active_branch
if current_branch.tracking_branch() is None:
remote_name = get_remote_name(repo)
else:
remote_name = current_branch.tracking_branch().remote_name
commit_hash = repo.head.commit.hexsha
url = repo.remotes.origin.url
url = repo.remotes[remote_name].url
git_custom_nodes[url] = dict(hash=commit_hash, disabled=is_disabled)
except:
print(f"Failed to extract snapshots for the custom node '{path}'.")

View File

@ -1,7 +1,7 @@
[project]
name = "comfyui-manager"
description = "ComfyUI-Manager provides features to install and manage custom nodes for ComfyUI, as well as various functionalities to assist with ComfyUI."
version = "3.7.1"
version = "3.7.2"
license = { file = "LICENSE.txt" }
dependencies = ["GitPython", "PyGithub", "matrix-client==0.4.0", "transformers", "huggingface-hub>0.20", "typer", "rich", "typing-extensions"]