Retry directory deletion to avoid Windows file locking issues.
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
This commit is contained in:
parent
86940df49f
commit
d63f798314
3 changed files with 3 additions and 3 deletions
2
lib/analyze.js
generated
2
lib/analyze.js
generated
|
|
@ -244,7 +244,7 @@ async function runFinalize(outputDir, threadsFlag, memoryFlag, config, logger) {
|
|||
}
|
||||
// After switching to Node16, this entire block can be replaced with `await fs.promises.rm(outputDir, { recursive: true, force: true });`.
|
||||
try {
|
||||
await fs.promises.rmdir(outputDir, { recursive: true });
|
||||
await fs.promises.rmdir(outputDir, { recursive: true, maxRetries: 5 });
|
||||
}
|
||||
catch (error) {
|
||||
if ((error === null || error === void 0 ? void 0 : error.code) !== "ENOENT") {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -425,7 +425,7 @@ export async function runFinalize(
|
|||
|
||||
// After switching to Node16, this entire block can be replaced with `await fs.promises.rm(outputDir, { recursive: true, force: true });`.
|
||||
try {
|
||||
await fs.promises.rmdir(outputDir, { recursive: true });
|
||||
await fs.promises.rmdir(outputDir, { recursive: true, maxRetries: 5 });
|
||||
} catch (error: any) {
|
||||
if (error?.code !== "ENOENT") {
|
||||
throw error;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue