Skip to content

Commit

Permalink
feat: submodules support
Browse files Browse the repository at this point in the history
  • Loading branch information
slon2015 committed Jun 21, 2024
1 parent e8b6925 commit 106ac28
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/fetcher/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,14 @@ class GitHubFetcher implements IFormulaFetcher {
await git.cwd({ path: repoPath });

if (await isEmptyDir(repoPath)) {
await git.clone(`[email protected]:${formulaRef.repo}.git`, repoPath);
await git.clone(`[email protected]:${formulaRef.repo}.git`, repoPath, [
"--recurse-submodules",
]);
} else {
await git.pull();
await git.pull(undefined, undefined, ["--recurse-submodules"]);
}
if (formulaRef.rev) {
await git.checkout(formulaRef.rev);
await git.checkout(formulaRef.rev, ["--recurse-submodules"]);
}
}

Expand Down

0 comments on commit 106ac28

Please sign in to comment.