diff --git a/projects/core/src/utils/file-utils.ts b/projects/core/src/utils/file-utils.ts index 27493c3..78d8012 100644 --- a/projects/core/src/utils/file-utils.ts +++ b/projects/core/src/utils/file-utils.ts @@ -77,7 +77,7 @@ export function withFileLock(filePath: string, fn: () => T): T { fs.writeFileSync(lockFilePath, ''); return fn(); } finally { - fs.unlinkSync(lockFilePath); + if (fs.existsSync(lockFilePath)) fs.unlinkSync(lockFilePath); } }