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).
This commit is contained in:
Michal Mocny 2013-11-29 14:39:09 -05:00
parent 2f66ec60db
commit 3d4ccbec23
2 changed files with 9 additions and 8 deletions

View File

@ -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);
}
);

View File

@ -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()]);
}