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/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/git-source-provider.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/git-source-provider.ts b/src/git-source-provider.ts
index 0752100..fc41fd2 100644
--- a/src/git-source-provider.ts
+++ b/src/git-source-provider.ts
@@ -59,8 +59,12 @@ export async function getSource(settings: ISourceSettings): Promise<void> {
settings.clean
))
) {
- await io.rmRF(settings.repositoryPath)
- await io.mkdirP(settings.repositoryPath)
+ // Delete the contents of the directory. Don't delete the directory itself
+ // since it may be the current working directory.
+ core.info(`Deleting the contents of '${settings.repositoryPath}'`)
+ for (const file of await fs.promises.readdir(settings.repositoryPath)) {
+ await io.rmRF(path.join(settings.repositoryPath, file))
+ }
}
// Initialize the repository