Skip to content

Commit 3f6892f

Browse files
authored
refactor: Replace unlinkSync with rmSync (#165)
1 parent 82f6202 commit 3f6892f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

projects/core/src/utils/file-utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export function withFileLock<T>(filePath: string, fn: () => T): T {
7777
fs.writeFileSync(lockFilePath, '');
7878
return fn();
7979
} finally {
80-
if (fs.existsSync(lockFilePath)) fs.unlinkSync(lockFilePath);
80+
if (fs.existsSync(lockFilePath)) fs.rmSync(lockFilePath, { force: true });
8181
}
8282
}
8383

0 commit comments

Comments
 (0)