Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing log to Java version check #624

Merged
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions bin/templates/cordova/lib/check_reqs.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,15 +355,16 @@ 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('ANDROID_HOME=' + process.env['ANDROID_HOME']);
fabiante marked this conversation as resolved.
Show resolved Hide resolved
console.log('JAVA_HOME=' + process.env['JAVA_HOME']);
brodybits marked this conversation as resolved.
Show resolved Hide resolved
console.log('Checking Java JDK and Android SDK versions');

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]}\nCheck your JAVA_HOME / PATH environment variables.`
fabiante marked this conversation as resolved.
Show resolved Hide resolved
);
}

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.');
}
});
};
Expand Down