From e5506d40bc444b468fbb04e4b9c3c9df6f3a0dec Mon Sep 17 00:00:00 2001 From: Vladimir Kotikov Date: Fri, 31 Jul 2015 16:37:21 +0300 Subject: [PATCH] CB-9430 Fixes check_reqs failure when javac returns an extra line --- bin/lib/check_reqs.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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]; }); }); };