Skip to content

Commit

Permalink
Refactor getAndUpdateIteration function to update iteration file path…
Browse files Browse the repository at this point in the history
… and simplify directory creation
  • Loading branch information
argahsuknesib committed Sep 24, 2024
1 parent 88c8f40 commit 3de1b13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function getTimestamp() {
}

function getAndUpdateIteration() {
const iterationFilePath = '/logs/iteration.txt';
const iterationFilePath = path.join(__dirname, '/logs/iteration.txt');
let iteration = 1;
if (fs.existsSync(iterationFilePath)) {
iteration = parseInt(fs.readFileSync(iterationFilePath, 'utf8'), 10) + 1;
Expand Down

0 comments on commit 3de1b13

Please sign in to comment.