cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmo...@apache.org
Subject android commit: Moving the console.log out of run() method
Date Fri, 29 Nov 2013 19:42:01 GMT
Updated Branches:
  refs/heads/master 2f66ec60d -> 3d4ccbec2


Moving the console.log out of run() method

Since cordova-cli calls the check_req library run() method, we do not
want to always console.log on success in there (not usually a useful side
effect).


Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/3d4ccbec
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/3d4ccbec
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/3d4ccbec

Branch: refs/heads/master
Commit: 3d4ccbec23c2801793b80f70a19e9612dc09263c
Parents: 2f66ec6
Author: Michal Mocny <mmocny@gmail.com>
Authored: Fri Nov 29 14:39:09 2013 -0500
Committer: Michal Mocny <mmocny@gmail.com>
Committed: Fri Nov 29 14:39:09 2013 -0500

----------------------------------------------------------------------
 bin/check_reqs        | 13 ++++++++-----
 bin/lib/check_reqs.js |  4 +---
 2 files changed, 9 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/3d4ccbec/bin/check_reqs
----------------------------------------------------------------------
diff --git a/bin/check_reqs b/bin/check_reqs
index 2ac8752..372a383 100755
--- a/bin/check_reqs
+++ b/bin/check_reqs
@@ -21,8 +21,11 @@
 
 var check_reqs = require('./lib/check_reqs');
 
-check_reqs.run().done(null, function(err) {
-    console.log(err);
-    process.exit(2);
-});
-
+check_reqs.run().done(
+    function success() {
+        console.log('Looks like your environment fully supports cordova-android development!');
+    }, function fail(err) {
+        console.log(err);
+        process.exit(2);
+    }
+);

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/3d4ccbec/bin/lib/check_reqs.js
----------------------------------------------------------------------
diff --git a/bin/lib/check_reqs.js b/bin/lib/check_reqs.js
index 5a71b0b..1c6f0f8 100644
--- a/bin/lib/check_reqs.js
+++ b/bin/lib/check_reqs.js
@@ -91,8 +91,6 @@ module.exports.check_android = function() {
 
 // Returns a promise.
 module.exports.run = function() {
-    return Q.all([this.check_ant(), this.check_java(), this.check_android()]).then(function()
{
-        console.log('Looks like your environment fully supports cordova-android development!');
-    });
+    return Q.all([this.check_ant(), this.check_java(), this.check_android()]);
 }
 


Mime
View raw message