-
Notifications
You must be signed in to change notification settings - Fork 774
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
emptyDir() callback arguments are inconsistent #287
Comments
This seems to happen to |
Just a clarification:
|
@jprichardson What is the correct |
When in doubt, we should:
These aren't hard rules though, especially if it means dirtying up the code to ensure that @rahatarmanahmed can you elaborate more on the problem this is causing your code? |
@jprichardson it causes issues when used with a package like run-waterfall. I ran into it while working on this PR: electron/packager@72ab0e7 |
If @rahatarmanahmed wants to submit a PR, SGTM. Suffice to say this isn't high-priority for me. |
Sorry, I only ran into this working on a PR for another project. I don't personally use fs-extra or run-waterfall, so it's not a high-priority for me either 😢 . (Plus it's not entirely a blocker, since there is a workaround). |
I don't think this is going to get fixed for v1.0.0, so removing the milestone. @jprichardson If you want to close this as |
@rahatarmanahmed interested in submitting a PR? |
@jprichardson Not really, sorry. Hate to be one of those hit-and-run issue creators, but I don't really have an investment in this project. |
@rahatarmanahmed I appreciate your candid response :) |
Going to close this as a wont-fix; not saying this will never change, but I don't see myself devoting time to this edge case in the near future. If someone stumbles across this again, PR welcome. |
When using
emptyDir()
, the arguments passed to the callback are inconsistent. When the directory doesn't exist, the arguments are[null, '/path/to/dir']
. If the directory does exist, there are no arguments passed.Reproduce with:
which outputs:
The text was updated successfully, but these errors were encountered: