Read-only mirror — the public repositories of the Forgejo instance, refreshed every 10 minutes. The live instance (fg.dieschoenewolke.de) is reachable only over the VPN; clone here with https://git.dieschoenewolke.de/git/<owner>/<repo>.git.
summaryrefslogtreecommitdiff
path: root/dist/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'dist/index.js')
-rw-r--r--dist/index.js12
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');