-
Notifications
You must be signed in to change notification settings - Fork 774
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fs.removeSync silently fails #407
Comments
Ugh, looks like another windows bug. Issues like this are hard to track down since I can't actually test them locally. I'm looking at https://github.com/jprichardson/node-fs-extra/blob/master/lib/remove/rimraf.js#L277; there's no |
@FredrikJohansson83 Give this branch a try: https://github.com/jprichardson/node-fs-extra/tree/rmSync-patch Run:
Then test again. Let me know your results. |
@RyanZim Thanks! I tried it and it seems to work! One difference compared to the async error callback though, it seems to include a stack trace of the error, but maybe this is how it's supposed to work when using it in a try/catch?
Gives the following output:
|
I think that looks like correct behavior. PR coming! |
PR done: #408 |
@RyanZim Great! Thanks for your support! |
For anyone else encountering this issue, it appears that fs-extra switched to using Node's own |
When using
fs.removeSync
in atry/catch
block, it silently fails. However, if I instead usefs.remove
with an error callback function, it does end up in the callback method.Using the following:
The text was updated successfully, but these errors were encountered: