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:
commit
630a8055c1
1 changed files with 3 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue