add option to pass options to git clone

Summary: We need this for dependencies that require submodules

Reviewed By: saifhhasan, GirasoleY

Differential Revision: D15282792

fbshipit-source-id: b0cc8d645e73668252409934fd6741fb211e30ae
This commit is contained in:
John Strizich 2019-05-10 13:52:26 -07:00 committed by Facebook Github Bot
parent 92a977f6eb
commit b22731e3b5

View File

@ -283,7 +283,9 @@ class FBCodeBuilder(object):
return self.step('Check out {0}, workdir {1}'.format(project, path), [
self.workdir(base_dir),
self.run(
ShellQuoted('git clone https://github.com/{p}').format(p=project)
ShellQuoted('git clone {opts} https://github.com/{p}').format(
p=project,
opts=ShellQuoted(self.option('{}:git_clone_opts'.format(project), '')))
) if not local_repo_dir else self.copy_local_repo(
local_repo_dir, os.path.basename(project)
),