Skip to content

Commit 40165b7

Browse files
committed
Don't crash if failing to remove a touch file (race condition)
1 parent bb69439 commit 40165b7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

jit/lib/setupContext.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ const touchDir =
3636
if (!sharedState.env.TAILWIND_DISABLE_TOUCH) {
3737
if (fs.existsSync(touchDir)) {
3838
for (let file of fs.readdirSync(touchDir)) {
39-
fs.unlinkSync(path.join(touchDir, file))
39+
try {
40+
fs.unlinkSync(path.join(touchDir, file))
41+
} catch (_err) {}
4042
}
4143
} else {
4244
fs.mkdirSync(touchDir, { recursive: true })

0 commit comments

Comments
 (0)