diff --git a/package.json b/package.json index f850977..ea60cfc 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "./dist/main.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "clean": "rm -rf ./dist ./persist", + "clean": "rm -rf ./dist", "build": "pnpm clean && tsc -p .", "start": "node ./dist/main.js", "clean-start": "pnpm build && pnpm start" diff --git a/src/utils/functions.ts b/src/utils/functions.ts index 17a7bc5..9346f7d 100644 --- a/src/utils/functions.ts +++ b/src/utils/functions.ts @@ -9,7 +9,7 @@ export function checkFile( const fullPath = dir + file; let final: ServerSideReview[]; - if (fs.existsSync(dir)) { + if (fs.existsSync(fullPath)) { const data = fs.readFileSync(fullPath, encoding); final = !data.toString().trim() ? [] : JSON.parse(data.toString());