-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
This appears to be caused by the fact that fs module is mutated by promisify('fs'). Internally, fs.writeFile uses some other fs methods in a callback fashion, so it expects fs to be un-modified.
Repro:
const promisify = require('promisify-node');
const fs = promisify('fs');
fs.writeFile('./testfile.txt', 'Hello World')
.then(() => {
console.log('File saved!');
})
.catch((error) => {
console.error('Error doing something:', error);
});
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.
binki
Metadata
Metadata
Assignees
Labels
No labels