diff --git a/dist/index.js b/dist/index.js index fe3f317..ee643e6 100644 --- a/dist/index.js +++ b/dist/index.js @@ -983,7 +983,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 f5ba40e..eeded82 100644 --- a/src/git-command-manager.ts +++ b/src/git-command-manager.ts @@ -448,7 +448,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}`) }