Download submodules when using base from git

This commit is contained in:
Luka Skugor
2019-08-08 15:49:56 +02:00
parent f9fe138114
commit 2de052ecd8

View File

@@ -96,6 +96,20 @@ func ClonerUsingGitExec(repoSpec *RepoSpec) error {
return errors.Wrapf(
err, "trouble hard resetting empty repository to %s", repoSpec.Ref)
}
cmd = exec.Command(
gitProgram,
"submodule",
"update",
"--init",
"--recursive")
cmd.Stdout = &out
cmd.Dir = repoSpec.Dir.String()
err = cmd.Run()
if err != nil {
return errors.Wrapf(err, "trouble fetching submodules for %s", repoSpec.Ref)
}
return nil
}