diff --git a/bin/lib/check_reqs.js b/bin/lib/check_reqs.js index ffa35b65..9d251596 100644 --- a/bin/lib/check_reqs.js +++ b/bin/lib/check_reqs.js @@ -155,7 +155,8 @@ module.exports.check_java = function() { // javac writes version info to stderr instead of stdout return tryCommand('javac -version', msg, true); }).then(function (output) { - return /^javac ((?:\d+\.)+(?:\d+))/i.exec(output)[1]; + var match = /javac ((?:\d+\.)+(?:\d+))/i.exec(output)[1]; + return match && match[1]; }); }); };