Removed PythonGit dependency.

This commit is contained in:
Sleepy Monax 2023-06-16 15:52:25 +02:00 committed by Sleepy Monax
parent 3cd6701482
commit e7bf85de6d

View file

@ -219,7 +219,8 @@ def grabExtern(extern: dict[str, Extern]):
continue continue
print(f"Installing {extSpec}-{ext.tag} from {ext.git}...") print(f"Installing {extSpec}-{ext.tag} from {ext.git}...")
git.Repo.clone_from(ext.git, extPath, branch=ext.tag, depth=1) shell.popen("git", "clone", "--depth", "1", "--branch",
ext.tag, ext.git, extPath)
if os.path.exists(os.path.join(extPath, "project.json")): if os.path.exists(os.path.join(extPath, "project.json")):
grabExtern(context.loadProject(extPath).extern) grabExtern(context.loadProject(extPath).extern)
@ -259,7 +260,7 @@ def initCmd(args: Args):
if not template: if not template:
raise RuntimeError('Template not specified') raise RuntimeError('Template not specified')
template_match: Callable[[Json], str] = lambda t: t['id'] == template template_match: Callable[[Json], str] = lambda t: t['id'] == template
if not any(filter(template_match, registry)): if not any(filter(template_match, registry)):
raise LookupError(f"Couldn't find a template named {template}") raise LookupError(f"Couldn't find a template named {template}")