Skip to content

Commit 6df066d

Browse files
committed
allow git clone over SSH and HTTP(S)
1 parent f7d3c94 commit 6df066d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pythonforandroid/recipe.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def report_hook(index, blksize, size):
9595

9696
urlretrieve(url, target, report_hook)
9797
return target
98-
elif parsed_url.scheme in ('git',):
98+
elif parsed_url.scheme in ('git', 'git+ssh', 'git+http', 'git+https'):
9999
if isdir(target):
100100
with current_directory(target):
101101
shprint(sh.git, 'fetch', '--tags')
@@ -105,6 +105,8 @@ def report_hook(index, blksize, size):
105105
shprint(sh.git, 'pull', '--recurse-submodules')
106106
shprint(sh.git, 'submodule', 'update', '--recursive')
107107
else:
108+
if url.startswith('git+'):
109+
url = url[4:]
108110
shprint(sh.git, 'clone', '--recursive', url, target)
109111
if self.version:
110112
with current_directory(target):

0 commit comments

Comments
 (0)