From 7439c7e577b7266360c199a2ef9576064c455fc2 Mon Sep 17 00:00:00 2001 From: David Kebler Date: Sun, 17 Mar 2019 13:38:36 -0700 Subject: [PATCH] 0.0.8 fix issue for emit, bind this to execute callback --- package.json | 10 +++++----- src/sync.js | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index b2b6414..aecdf95 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@uci-utils/sync", - "version": "0.0.7", + "version": "0.0.8", "description": "module to copy, maintain, and launch hardware modules on other machines", "main": "src/index.js", "bin": { @@ -38,15 +38,15 @@ "await-to-js": "^2.1.1", "conf": "^2.2.0", "debounce-fn": "^1.0.0", - "esm": "^3.2.5", + "esm": "^3.2.7", "fs-read-data": "^1.0.4", "path-exists": "^3.0.0", - "yargs": "^13.2.0" + "yargs": "^13.2.1" }, "devDependencies": { "chai": "^4.2.0", - "mocha": "^5.x", - "nodemon": "^1.18.9", + "mocha": "^6.x", + "nodemon": "^1.18.10", "ondeath": "^1.0.0" } } diff --git a/src/sync.js b/src/sync.js index 481e354..163282c 100644 --- a/src/sync.js +++ b/src/sync.js @@ -238,7 +238,8 @@ class Sync extends merge(Rsync, Emitter) { log.info({cmd:cmd, status:status, msg:'sync run'}) if (!errors) this.emit('sync',status) resolve({cmd:cmd, errors:errors, status:status, msg:'sync run'}) - }, function(data) { + }.bind(this), + function(data) { status += data.toString() if (opts.cli) process.stdout.write(data.toString()) },