1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge pull request #1864 from eval/git-module-prevent-permission-denied

Prevent permission denied when cloning
This commit is contained in:
Daniel Hokka Zakrisson 2013-01-13 05:52:52 -08:00
commit 630a8055c1

View file

@ -80,10 +80,12 @@ def get_version(dest):
def clone(repo, dest, remote):
''' makes a new git repo if it does not already exist '''
dest_dirname = os.path.dirname(dest)
try:
os.makedirs(os.path.dirname(dest))
os.makedirs(dest_dirname)
except:
pass
os.chdir(dest_dirname)
return _run("git clone -o %s %s %s" % (remote, repo, dest))
def has_local_mods(dest):