From 88c8f40545baf5583b4285843e18317b7dbdee83 Mon Sep 17 00:00:00 2001 From: Kushagra Singh Bisen Date: Tue, 24 Sep 2024 15:25:45 +0200 Subject: [PATCH] Refactor getAndUpdateIteration function to update iteration file path and simplify directory creation --- src/index.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index c57bb78..cb917ee 100644 --- a/src/index.ts +++ b/src/index.ts @@ -14,9 +14,6 @@ function getAndUpdateIteration() { if (fs.existsSync(iterationFilePath)) { iteration = parseInt(fs.readFileSync(iterationFilePath, 'utf8'), 10) + 1; } - else { - fs.mkdirSync(path.join('/logs')); - } fs.writeFileSync(iterationFilePath, iteration.toString()); return iteration; }