Add an error condition for an unstable Microsoft OpenJDK build#263
Add an error condition for an unstable Microsoft OpenJDK build#263dmitry-shibanov merged 2 commits intoactions:mainactions/setup-java:mainfrom dmitry-shibanov:v-dmshib/fix-ea-versions-microsoftdmitry-shibanov/setup-java:v-dmshib/fix-ea-versions-microsoftCopy head branch name to clipboard
Conversation
|
Hello everyone. Could you please take a look at these changes. |
| } | ||
|
|
||
| if (!this.stable) { | ||
| throw new Error('Unstable versions are not supported'); |
There was a problem hiding this comment.
What's the value of adding a special error message here? We only have two hardcoded versions currently. If someone requests something that's not one of those versions, we'll raise an error and show the available versions (lines 62-70 of this file).
There was a problem hiding this comment.
We can get ga/ea versions of java releases, but Microsoft OpenJDK builds do not have ea versions. If we pass 11-ea in java-version input, the action won't throw an error and install stable version, because the action normalizes version to 11 and set stable to the false value. For now I think we should write a condition to throw an error for ea builds.
There was a problem hiding this comment.
| throw new Error('Unstable versions are not supported'); | |
| throw new Error('Early access versions are not supported'); |
While it's true that it's not a stable version, "unstable" has a stronger denotation.
There was a problem hiding this comment.
Done. Thank you.
Description:
In scope of this pull request we add condition to throw an error for an unstable
Microsoft OpenJDKbuild. Some distributions support early access versions with syntax11-ea. For nowMicrosoft OpenJDKdoes not provideeaversions. The action will not throw an error if user tries to installeaversion forMicrosoft OpenJDKRelated issue:
Check list: