Skip to content

Commit

Permalink
ignore EBUSY on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
penalosa committed Oct 15, 2024
1 parent 5433d77 commit c1dcb9f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/wrangler/src/paths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,13 @@ export function getWranglerTmpDir(
const tmpPrefix = path.join(tmpRoot, `${prefix}-`);
const tmpDir = fs.realpathSync(fs.mkdtempSync(tmpPrefix));

const removeDir = () => fs.rmSync(tmpDir, { recursive: true, force: true });
const removeDir = () => {
try {
return fs.rmSync(tmpDir, { recursive: true, force: true });
} catch (e) {
// This sometimes fails on Windows with EBUSY
}
};
const removeExitListener = onExit(removeDir);

return {
Expand Down

0 comments on commit c1dcb9f

Please sign in to comment.