diff --git a/dist/setup/index.js b/dist/setup/index.js index 57b72a34..bf064621 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -105169,6 +105169,7 @@ const cache_1 = __nccwpck_require__(4810); const path = __importStar(__nccwpck_require__(1017)); const distribution_factory_1 = __nccwpck_require__(924); function run() { + var _a, _b, _c, _d; return __awaiter(this, void 0, void 0, function* () { try { const versions = core.getMultilineInput(constants.INPUT_JAVA_VERSION); @@ -105190,8 +105191,8 @@ function run() { .readFileSync(versionFileName) .toString() .trim(); - const semverRegExp = /(\d+\.\d+\.\d+.*ea.*$|\d+\.\d+\.\d+\+\d*$|\d+\.\d+\.\d+|\d+\.\d+|\d+\-ea$|\d+$)/; - let version = semverRegExp.test(contents) ? RegExp.$1 : ''; + const semverRegExp = /(?(?<=(^|\s|\-))(\d+\S*))(\s|$)/; + let version = ((_b = (_a = contents.match(semverRegExp)) === null || _a === void 0 ? void 0 : _a.groups) === null || _b === void 0 ? void 0 : _b.version) ? (_d = (_c = contents.match(semverRegExp)) === null || _c === void 0 ? void 0 : _c.groups) === null || _d === void 0 ? void 0 : _d.version : ''; let installed = false; while (!installed && version != '') { try {