fix(pnpm): allow EBUSY when deleting node_modules#6826
Merged
arcanis merged 2 commits intoyarnpkg:masterfrom Jul 26, 2025
lizthegrey:patch-1
Merged
fix(pnpm): allow EBUSY when deleting node_modules#6826arcanis merged 2 commits intoyarnpkg:masterfrom lizthegrey:patch-1
arcanis merged 2 commits intoyarnpkg:masterfrom
lizthegrey:patch-1
Conversation
EBUSY should be allowed, if we currently have file handles open inside the directory that deletion is attempted on (for instance if something has node_modules/.cache open, or if node_modules/.cache contains the pnpmStoreFolder)
Saadnajmi
pushed a commit
to Saadnajmi/berry
that referenced
this pull request
Jul 26, 2025
## What's the problem this PR addresses? EBUSY should be allowed, if `node_modules` is an active docker mountpoint where rmdir attempts to unmount it which fails because there are open files. Closes yarnpkg#4373 yarnpkg#4974 yarnpkg#4259 yarnpkg#1184 yarnpkg#4172 ## How did you fix it? Allow EBUSY to not block "clearing" node_modules. ## Checklist - [x] I have read the [Contributing Guide](https://yarnpkg.com/advanced/contributing). - [ ] I have set the packages that need to be released for my changes to be effective. - [ ] I will check that all automated PR checks pass before the PR gets reviewed. --------- Co-authored-by: Maël Nison <nison.mael@gmail.com>
Contributor
Author
|
Oh, thanks for taking it over the line, y'all <3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's the problem this PR addresses?
EBUSY should be allowed, if
node_modulesis an active docker mountpoint where rmdir attempts to unmount it which fails because there are open files.Closes #4373 #4974 #4259 #1184 #4172
How did you fix it?
Allow EBUSY to not block "clearing" node_modules.
Checklist