-
Notifications
You must be signed in to change notification settings - Fork 753
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an error condition for an unstable Microsoft OpenJDK build #263
Add an error condition for an unstable Microsoft OpenJDK build #263
Conversation
Hello everyone. Could you please take a look at these changes. |
@@ -40,6 +40,11 @@ export class MicrosoftDistributions extends JavaBase { | |||
if (this.architecture !== 'x64' && this.architecture !== 'aarch64') { | |||
throw new Error(`Unsupported architecture: ${this.architecture}`); | |||
} | |||
|
|||
if (!this.stable) { | |||
throw new Error('Unstable versions are not supported'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Thank you.
Description:
In scope of this pull request we add condition to throw an error for an unstable
Microsoft OpenJDK
build. Some distributions support early access versions with syntax11-ea
. For nowMicrosoft OpenJDK
does not provideea
versions. The action will not throw an error if user tries to installea
version forMicrosoft OpenJDK
Related issue:
Check list: