Skip to content

Commit

Permalink
Always pass a function to fs.close (#1228)
Browse files Browse the repository at this point in the history
This fixes DEP0013 in Node.js.
Without this fix Winston would break in Node.js 10.
  • Loading branch information
mcollina authored and indexzero committed Mar 6, 2018
1 parent fc85323 commit 8545787
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/winston/common.js
Expand Up @@ -63,7 +63,7 @@ exports.tailFile = function (options, iter) {

(function read() {
if (stream.destroyed) {
fs.close(fd);
fs.close(fd, nop);
return;
}

Expand Down Expand Up @@ -181,3 +181,5 @@ exports.warn = {
});
}
};

function nop () {}

0 comments on commit 8545787

Please sign in to comment.