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

Prevent permission denied when cloning
pull/1863/merge
Daniel Hokka Zakrisson 12 years ago
commit 630a8055c1

@ -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):

Loading…
Cancel
Save