-
Notifications
You must be signed in to change notification settings - Fork 23
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
Problem with fs.writeFile #17
Comments
Just hit this too. Tested on Ubuntu 14.04 using Node v5. Pretty unfortunate :( |
Actually, to add to this, because it mutates the module then all other files that require this module are affected. This cause cause some serious havoc if not rectified. For example, by promisifying |
I get this too:
|
Interestingly, if I don’t invoke
So there’s at least a workaround. I have no idea why it’s behaving this way. I tried adding to promisify-node’s testsuite and couldn’t reproduce the behavior inside the testsuite, even when supposedly deleting Oh, but it looks like when you pass a string and have
|
This appears to be caused by the fact that
fs
module is mutated bypromisify('fs')
. Internally,fs.writeFile
uses some otherfs
methods in a callback fashion, so it expectsfs
to be un-modified.Repro:
Neither 'File saved!' or 'Error doing something' ever gets logged. The file gets created but no data is written to it. Tested on OS X 10.11 using Node v5.
The text was updated successfully, but these errors were encountered: