You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2014/03/04 16:24:23 UTC

git commit: Fix node-style-callbacks form of the CLI api not passing through results.

Repository: cordova-cli
Updated Branches:
  refs/heads/master 75dfaf4a5 -> 5614f6fe8


Fix node-style-callbacks form of the CLI api not passing through results.

Same fix was made to plugman:
https://issues.apache.org/jira/browse/CB-6119


Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/5614f6fe
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/5614f6fe
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/5614f6fe

Branch: refs/heads/master
Commit: 5614f6fe819ea19ee18408449b9b0ca984cbe7f0
Parents: 75dfaf4
Author: Andrew Grieve <ag...@chromium.org>
Authored: Tue Mar 4 10:23:26 2014 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Tue Mar 4 10:23:26 2014 -0500

----------------------------------------------------------------------
 src/util.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/5614f6fe/src/util.js
----------------------------------------------------------------------
diff --git a/src/util.js b/src/util.js
index f042b1c..ebc437d 100644
--- a/src/util.js
+++ b/src/util.js
@@ -183,7 +183,7 @@ function addModuleProperty(module, symbol, modulePath, opt_wrap, opt_obj) {
                 // If args exist and the last one is a function, it's the callback.
                 var args = Array.prototype.slice.call(arguments);
                 var cb = args.pop();
-                val.apply(module.exports, args).done(cb, cb);
+                val.apply(module.exports, args).done(function(result) {cb(undefined, result)}, cb);
             } else {
                 val.apply(module.exports, arguments).done(null, function(err) { throw err; });
             }