diff --git a/dist/index.js b/dist/index.js index a251a19..8310318 100644 --- a/dist/index.js +++ b/dist/index.js @@ -978,7 +978,7 @@ class GitCommandManager { submoduleUpdate(fetchDepth, recursive) { return __awaiter(this, void 0, void 0, function* () { const args = ['-c', 'protocol.version=2']; - args.push('submodule', 'update', '--init', '--force'); + args.push('submodule', 'update', '--init', '--force', '--checkout'); if (fetchDepth > 0) { args.push(`--depth=${fetchDepth}`); } diff --git a/src/git-command-manager.ts b/src/git-command-manager.ts index a45e15a..cd9c3dd 100644 --- a/src/git-command-manager.ts +++ b/src/git-command-manager.ts @@ -450,7 +450,7 @@ class GitCommandManager { async submoduleUpdate(fetchDepth: number, recursive: boolean): Promise { const args = ['-c', 'protocol.version=2'] - args.push('submodule', 'update', '--init', '--force') + args.push('submodule', 'update', '--init', '--force', '--checkout') if (fetchDepth > 0) { args.push(`--depth=${fetchDepth}`) }