Update index.js

This commit is contained in:
Plamen Totev 2020-04-12 18:40:21 +03:00
parent 3edd66d1b0
commit c17ce21dd4

5
dist/index.js generated vendored
View file

@ -4873,6 +4873,11 @@ function getDownloadInfo(refs, version, javaPackage) {
return { version: curVersion, url: curUrl }; return { version: curVersion, url: curUrl };
} }
function normalizeVersion(version) { 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.') { if (version.slice(0, 2) === '1.') {
// Trim leading 1. for versions like 1.8 // Trim leading 1. for versions like 1.8
version = version.slice(2); version = version.slice(2);