From 16b117adfac20404cdc437f7370c9fe1b72e28c9 Mon Sep 17 00:00:00 2001 From: assafmo Date: Thu, 8 Feb 2018 14:36:34 +0200 Subject: [PATCH] Suppress NodeJS's 7.2.1 DeprecationWarning Suppress `DeprecationWarning: Calling an asynchronous function without callback is deprecated.` when calling `fs.close` without a callback. I just added a nop function. --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 6b754fd..dc78844 100644 --- a/index.js +++ b/index.js @@ -24,7 +24,7 @@ Tail = (function(_super) { var next = function() { if (block.type == 'close') { - fs.close(block.fd); + fs.close(block.fd, function(){}); delete self.bookmarks[block.fd]; }; @@ -161,7 +161,7 @@ Tail = (function(_super) { }; if (self.fd) { - fs.close(self.fd); + fs.close(self.fd, function(){}); self.fd = null; }; @@ -169,7 +169,7 @@ Tail = (function(_super) { for (var i in self.queue) { var item = self.queue[i]; if (item.type == 'close') { - fs.close(item.fd); + fs.close(item.fd, function(){}); }; };