diff --git a/projects/core/src/utils/file-utils.ts b/projects/core/src/utils/file-utils.ts index 78d8012..3a118c5 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 { - if (fs.existsSync(lockFilePath)) fs.unlinkSync(lockFilePath); + if (fs.existsSync(lockFilePath)) fs.rmSync(lockFilePath, { force: true }); } }