Skip to content

Commit 2315396

Browse files
committed
fix: add maxRetries to fs.rm in clean to handle ENOTEMPTY race conditions
1 parent 9545726 commit 2315396

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/makage/src/commands/clean.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export async function runClean(paths: string[]) {
44
const pathsToClean = paths.length ? paths : ['dist'];
55

66
for (const p of pathsToClean) {
7-
await fs.rm(p, { recursive: true, force: true });
7+
await fs.rm(p, { recursive: true, force: true, maxRetries: 3, retryDelay: 100 });
88
console.log(`[makage] removed ${p}`);
99
}
1010
}

0 commit comments

Comments
 (0)