You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ra...@apache.org on 2018/09/05 09:26:36 UTC
[cordova-cli] branch master updated: Remove callback parameter of
main CLI function (#316)
This is an automated email from the ASF dual-hosted git repository.
raphinesse pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-cli.git
The following commit(s) were added to refs/heads/master by this push:
new c9f29c6 Remove callback parameter of main CLI function (#316)
c9f29c6 is described below
commit c9f29c64d85c10a824798797c090d3321335ac8e
Author: Raphael von der GrĂ¼n <ra...@gmail.com>
AuthorDate: Wed Sep 5 11:26:34 2018 +0200
Remove callback parameter of main CLI function (#316)
Resolves #314
---
src/cli.js | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/src/cli.js b/src/cli.js
index 9158665..ff8e0c5 100644
--- a/src/cli.js
+++ b/src/cli.js
@@ -96,12 +96,7 @@ function checkForUpdates () {
var shouldCollectTelemetry = false;
-module.exports = function (inputArgs, cb) {
- /**
- * mainly used for testing.
- */
- cb = cb || function () {};
-
+module.exports = function (inputArgs) {
// If no inputArgs given, use process.argv.
inputArgs = inputArgs || process.argv;
var cmd = inputArgs[2]; // e.g: inputArgs= 'node cordova run ios'
@@ -205,14 +200,10 @@ module.exports = function (inputArgs, cb) {
if (shouldCollectTelemetry && !isTelemetryCmd) {
telemetry.track(cmd, subcommand, 'successful');
}
- // call cb with error as arg if something failed
- cb(null);
}).catch(function (err) {
if (shouldCollectTelemetry && !isTelemetryCmd) {
telemetry.track(cmd, subcommand, 'unsuccessful');
}
- // call cb with error as arg if something failed
- cb(err);
throw err;
});
};
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org