From c17ce21dd478784d176e5a865f2c3c31b47c72a9 Mon Sep 17 00:00:00 2001 From: Plamen Totev Date: Sun, 12 Apr 2020 18:40:21 +0300 Subject: [PATCH] Update index.js --- dist/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dist/index.js b/dist/index.js index 96632653..5cecee11 100644 --- a/dist/index.js +++ b/dist/index.js @@ -4873,6 +4873,11 @@ function getDownloadInfo(refs, version, javaPackage) { return { version: curVersion, url: curUrl }; } function normalizeVersion(version) { + // 'latest' means the most recent of any JDK version + // semver won't match pre-release versions + if (version === 'latest') { + version = 'x'; + } if (version.slice(0, 2) === '1.') { // Trim leading 1. for versions like 1.8 version = version.slice(2);