From cfe9c682ae9365f85b16c683d1efe4ceab747a4e Mon Sep 17 00:00:00 2001 From: oleg Date: Tue, 7 Jul 2015 23:09:41 +0300 Subject: [PATCH] log smv in to console, attach scm stderr to error --- lib/executor/local.js | 4 ++++ lib/scm/base.js | 2 ++ package.json | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/executor/local.js b/lib/executor/local.js index 665079d..a4be219 100644 --- a/lib/executor/local.js +++ b/lib/executor/local.js @@ -41,6 +41,10 @@ Executor.prototype._getSources = function(params, callback) { } scm = self._createScm(scmParams); + scm.on('stdin', function(data) { + self.emit('data', '> ' + String(data)); + }); + if (isFirstRun) { this.pass(null); } else { diff --git a/lib/scm/base.js b/lib/scm/base.js index a626bef..ad1c89d 100644 --- a/lib/scm/base.js +++ b/lib/scm/base.js @@ -10,6 +10,8 @@ function Scm(params) { '`repository` or `cwd` must be set' ); this.collectOut = true; + this.emitIn = true; + this.attachStderr = true; } exports.Scm = Scm; diff --git a/package.json b/package.json index f8f0c3a..75ceab9 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "nci": "bin/nci" }, "scripts": { - "test": "mocha --bail --reporter=spec test/index", + "test": "mocha --bail --reporter=spec test/index --timeout 3000", "dev": "gulp", "sync": "npm install && npm prune && bower install && bower prune" },