diff options
Diffstat (limited to 'dist')
| -rw-r--r-- | dist/index.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/dist/index.js b/dist/index.js index 1b418d7..13a291a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -765,6 +765,13 @@ class GitCommandManager { yield this.execGit(args); }); } + submoduleStatus() { + return __awaiter(this, void 0, void 0, function* () { + const output = yield this.execGit(['submodule', 'status'], true); + core.debug(output.stdout); + return output.exitCode === 0; + }); + } tagExists(pattern) { return __awaiter(this, void 0, void 0, function* () { const output = yield this.execGit(['tag', '--list', pattern]); @@ -1023,6 +1030,11 @@ function prepareExistingDirectory(git, repositoryPath, repositoryUrl, clean, ref } } core.endGroup(); + // Check for submodules and delete any existing files if submodules are present + if (!(yield git.submoduleStatus())) { + remove = true; + core.info('Bad Submodules found, removing existing files'); + } // Clean if (clean) { core.startGroup('Cleaning the repository'); |
