Fix error with submodule cloning

Call `git submodule update --init` manually rather than using GitPython's
submodule API, as that fails with the following repo as a submodule:
https://files.creativekara.fr/git/naturalslopeslib.git
This commit is contained in:
rubenwardy 2021-07-18 02:46:36 +01:00
parent 9e95b69c11
commit 72a95ecfca
1 changed files with 1 additions and 3 deletions

View File

@ -60,9 +60,7 @@ def clone_repo(urlstr, ref=None, recursive=False):
origin.fetch()
repo.git.checkout(ref)
if recursive:
for submodule in repo.submodules:
submodule.update(init=True)
repo.git.submodule('update', '--init')
yield repo
shutil.rmtree(gitDir)