Update scanner.py

Added measures to limit the amount of things downloaded from git.
This commit is contained in:
KaruroChori 2024-09-01 12:02:53 +00:00 committed by GitHub
parent f75384ecdd
commit 65e17a3c3f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -259,7 +259,7 @@ def clone_or_pull_git_repository(git_url):
print(f"Pulling {repo_name} failed: {e}") print(f"Pulling {repo_name} failed: {e}")
else: else:
try: try:
Repo.clone_from(git_url, repo_dir, recursive=True) Repo.clone_from(git_url, repo_dir, multi_options = ["--depth=1", "--single-branch" "--recurse-submodules"])
print(f"Cloning {repo_name}...") print(f"Cloning {repo_name}...")
except Exception as e: except Exception as e:
print(f"Cloning {repo_name} failed: {e}") print(f"Cloning {repo_name} failed: {e}")
@ -525,4 +525,4 @@ updated_node_info = update_custom_nodes()
print("\n# 'extension-node-map.json' file is generated.\n") print("\n# 'extension-node-map.json' file is generated.\n")
gen_json(updated_node_info) gen_json(updated_node_info)
print("\nDONE.\n") print("\nDONE.\n")