CB-11640: Changing requirements check to ask for Java 8

This commit is contained in:
Joe Bowser 2016-09-19 13:35:16 -07:00
parent 30325e4f32
commit 47abde2f8d

View File

@ -152,7 +152,9 @@ module.exports.check_java = function() {
// javac writes version info to stderr instead of stdout // javac writes version info to stderr instead of stdout
return tryCommand('javac -version', msg, true) return tryCommand('javac -version', msg, true)
.then(function (output) { .then(function (output) {
var match = /javac ((?:\d+\.)+(?:\d+))/i.exec(output); console.log(output);
//Let's check for at least Java 8, and keep it future proof so we can support Java 10
var match = /javac ((?:1\.)(?:[8-9]\.)(?:\d+))|((?:1\.)(?:[1-9]\d+\.))(?:\d+)/i.exec(output);
return match && match[1]; return match && match[1];
}); });
}); });