Don't crash if failing to remove a touch file (race condition)
This commit is contained in:
parent
d541742774
commit
fea75a0c8d
1 changed files with 3 additions and 1 deletions
|
|
@ -36,7 +36,9 @@ const touchDir =
|
|||
if (!sharedState.env.TAILWIND_DISABLE_TOUCH) {
|
||||
if (fs.existsSync(touchDir)) {
|
||||
for (let file of fs.readdirSync(touchDir)) {
|
||||
fs.unlinkSync(path.join(touchDir, file))
|
||||
try {
|
||||
fs.unlinkSync(path.join(touchDir, file))
|
||||
} catch (_err) {}
|
||||
}
|
||||
} else {
|
||||
fs.mkdirSync(touchDir, { recursive: true })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue