diff --git a/packages/plugin-pnpm/sources/PnpmLinker.ts b/packages/plugin-pnpm/sources/PnpmLinker.ts index 6a0db08dc765..ab3c4b36efd4 100644 --- a/packages/plugin-pnpm/sources/PnpmLinker.ts +++ b/packages/plugin-pnpm/sources/PnpmLinker.ts @@ -399,7 +399,7 @@ async function removeIfEmpty(dir: PortablePath) { try { await xfs.rmdirPromise(dir); } catch (error) { - if (error.code !== `ENOENT` && error.code !== `ENOTEMPTY`) { + if (error.code !== `ENOENT` && error.code !== `ENOTEMPTY` && error.code !== `EBUSY`) { throw error; } }