-
Notifications
You must be signed in to change notification settings - Fork 29.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fs: rimraf should not recurse on failure #35566
Conversation
CC: @iansu |
I'd love to see a test for this but I realize that might be tricky in this case. |
@iansu was trying to think of a reasonable way to test this, and an idea doesn't immediately jump out at me that's not terrible. We lazy load rimraf, so perhaps I could mock |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Landed in 7d66722 |
PR-URL: #35566 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: #35566 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: nodejs#35566 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
When an error occurs while running
rimrafSync
, we pass the original options through to the call tormdirSync
, this in turn spawns another call torimraf
, rather than simply removing the file.Fixes #34266
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes