From cd37547e20c41550b4db2e1b5b40d5e089b8d50d Mon Sep 17 00:00:00 2001 From: stefan judis Date: Sun, 8 Feb 2015 12:52:41 +0100 Subject: [PATCH] added check for not matching java versions added openjdk check --- lib/util/util.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/util/util.js b/lib/util/util.js index 3eb38b934..8e306a802 100644 --- a/lib/util/util.js +++ b/lib/util/util.js @@ -358,8 +358,8 @@ module.exports = { if (err) { return callback(err); } - var matches = stderr.match(/java version "(.*)"/); - var version = matches.length === 2 ? matches[1] : 'unknown'; + var matches = stderr.match(/(java version|openjdk version) "(.*)"/); + var version = (matches && matches.length === 3) ? matches[2] : 'unknown'; return callback(null, version); }); }