Addon Manager: Display download progress

This commit is contained in:
Chris Hennes
2022-01-09 00:46:07 -06:00
parent e4bb4e7db7
commit 2cbe72aea5
2 changed files with 95 additions and 50 deletions

View File

@@ -297,6 +297,18 @@ def fix_relative_links(text, base_url):
def repair_git_repo(repo_url: str, clone_dir: str) -> None:
# Repair addon installed with raw download by adding the .git
# directory to it
try:
import git
# If GitPython is not installed, but the user has a directory named "git" in their Python path, they
# may have the import succeed, but it will not be a real GitPython installation
have_git = hasattr(git, "Repo")
if not have_git:
return
except ImportError:
return
try:
bare_repo = git.Repo.clone_from(
repo_url, clone_dir + os.sep + ".git", bare=True