Fixes issue with file descriptor on OSX

This commit is contained in:
Zachary Boyd 2017-07-25 08:41:57 -07:00
parent cb49f4d08e
commit ce0be3c1f5

View file

@ -58,8 +58,7 @@ class TorProcess extends EventEmitter {
temp.open('tor-router', (err, info) => {
if (err) return callback(err);
fs.write(info.fd, text);
fs.close(info.fd, (err) => {
fs.writeFile(info.path, text, (err) => {
callback(err, info.path);
});
});