You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by al...@apache.org on 2016/06/09 14:40:29 UTC
cordova-paramedic git commit: Handle build errors when using sauce
Repository: cordova-paramedic
Updated Branches:
refs/heads/master 317fd11b2 -> 93b6509a4
Handle build errors when using sauce
Project: http://git-wip-us.apache.org/repos/asf/cordova-paramedic/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-paramedic/commit/93b6509a
Tree: http://git-wip-us.apache.org/repos/asf/cordova-paramedic/tree/93b6509a
Diff: http://git-wip-us.apache.org/repos/asf/cordova-paramedic/diff/93b6509a
Branch: refs/heads/master
Commit: 93b6509a4e02799cd3db3d7a2d3d1f0fab9ff859
Parents: 317fd11
Author: Alexander Sorokin <al...@akvelon.com>
Authored: Thu Jun 9 17:39:01 2016 +0300
Committer: Alexander Sorokin <al...@akvelon.com>
Committed: Thu Jun 9 17:40:15 2016 +0300
----------------------------------------------------------------------
lib/paramedic.js | 16 ++++++++++++----
lib/utils/execWrapper.js | 4 ++--
2 files changed, 14 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-paramedic/blob/93b6509a/lib/paramedic.js
----------------------------------------------------------------------
diff --git a/lib/paramedic.js b/lib/paramedic.js
index dbf87fa..68791de 100644
--- a/lib/paramedic.js
+++ b/lib/paramedic.js
@@ -197,7 +197,15 @@ ParamedicRunner.prototype.runTests = function () {
logger.normal('cordova-paramedic: running command ' + command);
return execPromise(command)
- .then(self.runSauceTests.bind(self));
+ .then(self.runSauceTests.bind(self), function(output) {
+ // this trace is automatically available in verbose mode
+ // so we check for this flag to not trace twice
+ if (!self.config.verbose) {
+ logger.normal(output);
+ }
+ logger.normal('cordova-paramedic: unable to build project; command log is available above');
+ throw new Error('Command "' + command + '" failed.');
+ });
} else {
return self.getCommandForStartingTests()
.then(function(command) {
@@ -206,7 +214,7 @@ ParamedicRunner.prototype.runTests = function () {
return execPromise(command);
})
- .then(function(code, output) {
+ .then(function() {
// skip tests if it was just build
if (self.shouldWaitForTestResult()) {
return Q.promise(function(resolve, reject) {
@@ -216,14 +224,14 @@ ParamedicRunner.prototype.runTests = function () {
self.waitForTests().then(resolve);
});
}
- }, function(code, output) {
+ }, function(output) {
// this trace is automatically available in verbose mode
// so we check for this flag to not trace twice
if (!self.config.verbose) {
logger.normal(output);
}
logger.normal('cordova-paramedic: unable to run tests; command log is available above');
- throw new Error(command + ' returned error code ' + code);
+ throw new Error('Command "' + command + '" failed.');
});
}
};
http://git-wip-us.apache.org/repos/asf/cordova-paramedic/blob/93b6509a/lib/utils/execWrapper.js
----------------------------------------------------------------------
diff --git a/lib/utils/execWrapper.js b/lib/utils/execWrapper.js
index 44ad93b..a874038 100644
--- a/lib/utils/execWrapper.js
+++ b/lib/utils/execWrapper.js
@@ -37,9 +37,9 @@ function execPromise(cmd) {
return Q.promise(function (resolve, reject) {
exec(cmd, function (code, output) {
if (code) {
- reject(code, output);
+ reject(output);
} else {
- resolve(code, output);
+ resolve(output);
}
});
});
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org