Run git commands in the right repo

This commit is contained in:
Ben Jackson 2020-01-09 17:19:35 +00:00
commit 05d377217d

View file

@ -498,14 +498,14 @@ def MakeSymlink( in_folder, link, pointing_to ):
def CloneRepoTo( url, ref, destination ): def CloneRepoTo( url, ref, destination ):
RemoveIfExists( destination ) RemoveIfExists( destination )
git_in_repo = [ 'git', '-C', destination ]
subprocess.check_call( [ 'git', 'clone', url, destination ] ) subprocess.check_call( [ 'git', 'clone', url, destination ] )
subprocess.check_call( [ 'git', '-C', destination, 'checkout', ref ] ) subprocess.check_call( git_in_repo + [ 'checkout', ref ] )
subprocess.check_call( [ 'git', 'submodule', 'sync', '--recursive' ] ) subprocess.check_call( git_in_repo + [ 'submodule', 'sync', '--recursive' ] )
subprocess.check_call( [ 'git', subprocess.check_call( git_in_repo + [ 'submodule',
'submodule', 'update',
'update', '--init',
'--init', '--recursive' ] )
'--recursive' ] )
OS = install.GetOS() OS = install.GetOS()