You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bo...@apache.org on 2015/09/23 21:58:26 UTC
[15/45] android commit: CB-9397 Fixes minor issues with `cordova
requirements android`
CB-9397 Fixes minor issues with `cordova requirements android`
Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/e02cbc73
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/e02cbc73
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/e02cbc73
Branch: refs/heads/5.0.x
Commit: e02cbc7344699550a583051af11336680611be70
Parents: 082e299
Author: Vladimir Kotikov <v-...@microsoft.com>
Authored: Wed Jul 22 16:45:49 2015 +0300
Committer: Joe Bowser <bo...@apache.org>
Committed: Thu Aug 20 13:48:03 2015 -0700
----------------------------------------------------------------------
bin/lib/check_reqs.js | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-android/blob/e02cbc73/bin/lib/check_reqs.js
----------------------------------------------------------------------
diff --git a/bin/lib/check_reqs.js b/bin/lib/check_reqs.js
index 0b31a2a..ffa35b6 100644
--- a/bin/lib/check_reqs.js
+++ b/bin/lib/check_reqs.js
@@ -82,9 +82,13 @@ module.exports.check_ant = function() {
// Returns a promise. Called only by build and clean commands.
module.exports.check_gradle = function() {
var sdkDir = process.env['ANDROID_HOME'];
+ if (!sdkDir)
+ return Q.reject('Could not find gradle wrapper within Android SDK. Could not find Android SDK directory.\n' +
+ 'Might need to install Android SDK or set up \'ANDROID_HOME\' env variable.');
+
var wrapperDir = path.join(sdkDir, 'tools', 'templates', 'gradle', 'wrapper');
if (!fs.existsSync(wrapperDir)) {
- return Q.reject(new Error('Could not find gradle wrapper within android sdk. Might need to update your Android SDK.\n' +
+ return Q.reject(new Error('Could not find gradle wrapper within Android SDK. Might need to update your Android SDK.\n' +
'Looked here: ' + wrapperDir));
}
return Q.when();
@@ -312,7 +316,7 @@ module.exports.check_all = function() {
requirement.installed = true;
requirement.metadata.version = version;
}, function (err) {
- requirement.metadata.reason = err;
+ requirement.metadata.reason = err instanceof Error ? err.message : err;
});
}, Q())
.then(function () {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org