mirror of
https://github.com/actions/setup-java.git
synced 2025-04-21 10:26:46 +00:00
Update index.js
This commit is contained in:
parent
3edd66d1b0
commit
c17ce21dd4
1 changed files with 5 additions and 0 deletions
5
dist/index.js
generated
vendored
5
dist/index.js
generated
vendored
|
@ -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);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue