From da826a6ba43bdae03dd8791579428358e90070c2 Mon Sep 17 00:00:00 2001 From: "Fred K. Schott" Date: Thu, 10 Mar 2022 15:17:24 -0800 Subject: [PATCH] Update util.ts (#2761) --- packages/astro/src/core/util.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/astro/src/core/util.ts b/packages/astro/src/core/util.ts index 1142df590..f4319b7cf 100644 --- a/packages/astro/src/core/util.ts +++ b/packages/astro/src/core/util.ts @@ -101,7 +101,7 @@ export function viteID(filePath: URL): string { /** An fs utility, similar to `rimraf` or `rm -rf` */ export function removeDir(_dir: URL): void { const dir = fileURLToPath(_dir); - fs.rmSync(dir, { recursive: true, force: true }); + fs.rmSync(dir, { recursive: true, force: true, maxRetries: 3 }); } export function emptyDir(_dir: URL, skip?: Set): void { @@ -111,7 +111,7 @@ export function emptyDir(_dir: URL, skip?: Set): void { if (skip?.has(file)) { continue; } - fs.rmSync(path.resolve(dir, file), { recursive: true, force: true }); + fs.rmSync(path.resolve(dir, file), { recursive: true, force: true, maxRetries: 3 }); } }