Skip to content
Permalink
Browse files
fix: unlink the outDir twice will report an error (#569)
  • Loading branch information
ahaoboy committed Feb 23, 2022
1 parent b9b8170 commit 5bd68194fedb5d5d5a6f091f66a9542410e6a5bd
Showing 1 changed file with 1 addition and 1 deletion.
@@ -64,7 +64,7 @@ export async function removeFiles(patterns: string[], dir: string) {
cwd: dir,
absolute: true,
})
await Promise.all(files.map((file) => fs.promises.unlink(file)))
files.forEach((file) => fs.existsSync(file) && fs.unlinkSync(file))
}

export function debouncePromise<T extends unknown[]>(

0 comments on commit 5bd6819

Please sign in to comment.