mirror of
https://github.com/actions/setup-java.git
synced 2025-04-20 09:56:46 +00:00
allow non-semver version for local distributions
This commit is contained in:
parent
8048bbee47
commit
7412c384a0
2 changed files with 2 additions and 2 deletions
2
dist/setup/index.js
vendored
2
dist/setup/index.js
vendored
|
@ -101850,7 +101850,7 @@ class JavaBase {
|
||||||
version = version.replace('-ea.', '+');
|
version = version.replace('-ea.', '+');
|
||||||
stable = false;
|
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`);
|
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 {
|
return {
|
||||||
|
|
|
@ -129,7 +129,7 @@ export abstract class JavaBase {
|
||||||
stable = false;
|
stable = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!semver.validRange(version)) {
|
if (this.distribution !== 'jdkfile' && !semver.validRange(version)) {
|
||||||
throw new Error(
|
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`
|
`The string '${version}' is not valid SemVer notation for a Java version. Please check README file for code snippets and more detailed information`
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue