From f9352a780eeb06d04f6c448fae9173671cd64ef5 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Wed, 15 Feb 2017 21:59:40 -0800 Subject: [PATCH 1/2] Fix deprecation warning in Node 7 "DeprecationWarning: Calling an asynchronous function without callback is deprecated" --- index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/index.js b/index.js index bc0c709..6eb0d79 100644 --- a/index.js +++ b/index.js @@ -52,8 +52,7 @@ Deb.prototype.pack = function (definition, files, callback) { fs.unlink.bind(fs, path.join(tempPath, 'data.tar.gz')), fs.unlink.bind(fs, path.join(tempPath, 'debian-binary')), ], function (err) { - fs.rmdir(tempPath) - done() + fs.rmdir(tempPath, done) }) }) } From 1afd55315204d164f08709830f8c0d24b6a80a5f Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Wed, 15 Feb 2017 22:01:17 -0800 Subject: [PATCH 2/2] Handle error correctly; fix standard style warning --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 6eb0d79..8935357 100644 --- a/index.js +++ b/index.js @@ -50,8 +50,9 @@ Deb.prototype.pack = function (definition, files, callback) { async.parallel([ fs.unlink.bind(fs, path.join(tempPath, 'control.tar.gz')), fs.unlink.bind(fs, path.join(tempPath, 'data.tar.gz')), - fs.unlink.bind(fs, path.join(tempPath, 'debian-binary')), + fs.unlink.bind(fs, path.join(tempPath, 'debian-binary')) ], function (err) { + if (err) return done(err) fs.rmdir(tempPath, done) }) })