diff --git a/dist/setup/index.js b/dist/setup/index.js index 987c071b..96ca1c18 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -101850,7 +101850,7 @@ class JavaBase { version = version.replace('-ea.', '+'); stable = false; } - if (!semver_1.default.validRange(version)) { + if (this.distribution !== 'jdkfile' && !semver_1.default.validRange(version)) { throw new Error(`The string '${version}' is not valid SemVer notation for a Java version. Please check README file for code snippets and more detailed information`); } return { diff --git a/src/distributions/base-installer.ts b/src/distributions/base-installer.ts index a07db43d..c76c79c5 100644 --- a/src/distributions/base-installer.ts +++ b/src/distributions/base-installer.ts @@ -129,7 +129,7 @@ export abstract class JavaBase { stable = false; } - if (!semver.validRange(version)) { + if (this.distribution !== 'jdkfile' && !semver.validRange(version)) { throw new Error( `The string '${version}' is not valid SemVer notation for a Java version. Please check README file for code snippets and more detailed information` );