diff --git a/dist/index.js b/dist/index.js index b0db713..87d720d 100644 --- a/dist/index.js +++ b/dist/index.js @@ -796,7 +796,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 8e42a38..a2a3bda 100644 --- a/src/git-command-manager.ts +++ b/src/git-command-manager.ts @@ -411,7 +411,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}`) }