Skip to content

Commit

Permalink
fix: Lock file deletion check (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherhelf committed Jun 15, 2023
1 parent 8802054 commit cacf908
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion projects/core/src/utils/file-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export function withFileLock<T>(filePath: string, fn: () => T): T {
fs.writeFileSync(lockFilePath, '');
return fn();
} finally {
fs.unlinkSync(lockFilePath);
if (fs.existsSync(lockFilePath)) fs.unlinkSync(lockFilePath);
}
}

Expand Down

0 comments on commit cacf908

Please sign in to comment.