Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,19 @@ export async function cloneRepo(url: string, ref?: string): Promise<string> {

try {
await git.clone(url, tempDir, cloneOptions);

// Initialize submodules if any exist
try {
const repoGit = simpleGit({
timeout: { block: CLONE_TIMEOUT_MS },
env: { ...process.env, GIT_TERMINAL_PROMPT: '0' },
});
await repoGit.cwd(tempDir);
await repoGit.submoduleUpdate(['--init', '--recursive', '--depth', '1']);
} catch {
// Submodule init is best-effort — skip silently if no submodules or if it fails
}

return tempDir;
} catch (error) {
// Clean up temp dir on failure
Expand Down