Commit 630a8055 by Daniel Hokka Zakrisson

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

Prevent permission denied when cloning
parents b0ab81b2 f4dcb33c
...@@ -80,10 +80,12 @@ def get_version(dest): ...@@ -80,10 +80,12 @@ def get_version(dest):
def clone(repo, dest, remote): def clone(repo, dest, remote):
''' makes a new git repo if it does not already exist ''' ''' makes a new git repo if it does not already exist '''
dest_dirname = os.path.dirname(dest)
try: try:
os.makedirs(os.path.dirname(dest)) os.makedirs(dest_dirname)
except: except:
pass pass
os.chdir(dest_dirname)
return _run("git clone -o %s %s %s" % (remote, repo, dest)) return _run("git clone -o %s %s %s" % (remote, repo, dest))
def has_local_mods(dest): def has_local_mods(dest):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment