mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 07:02:51 +08:00
Add missing log to Java version check (#624)
* Add missing log to Java version check * Simplify version check output Resolves #623
This commit is contained in:
parent
715ce2f9ac
commit
54df4a116c
9
bin/templates/cordova/lib/check_reqs.js
vendored
9
bin/templates/cordova/lib/check_reqs.js
vendored
@ -355,15 +355,18 @@ module.exports.check_android_target = function (originalError) {
|
||||
// Returns a promise.
|
||||
module.exports.run = function () {
|
||||
return Q.all([this.check_java(), this.check_android()]).then(function (values) {
|
||||
console.log('Checking Java JDK and Android SDK versions');
|
||||
console.log('ANDROID_HOME=' + process.env['ANDROID_HOME']);
|
||||
console.log('JAVA_HOME=' + process.env['JAVA_HOME']);
|
||||
|
||||
if (!String(values[0]).startsWith('1.8.')) {
|
||||
throw new CordovaError(`Requirements check failed for JDK 8 ('1.8.*')`);
|
||||
throw new CordovaError(
|
||||
'Requirements check failed for JDK 8 (\'1.8.*\')! Detected version: ' + values[0] + '\n' +
|
||||
'Check your JAVA_HOME / ANDROID_HOME / PATH environment variables.'
|
||||
);
|
||||
}
|
||||
|
||||
if (!values[1]) {
|
||||
throw new CordovaError('Requirements check failed for Android SDK');
|
||||
throw new CordovaError('Requirements check failed for Android SDK! Android SDK was not detected.');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user