Add an error condition for an unstable Microsoft OpenJDK build (#263) · actions/setup-java@d23aed3 (original) (raw)

File tree

Original file line number Diff line number Diff line change
@@ -13886,6 +13886,9 @@ class MicrosoftDistributions extends base_installer_1.JavaBase {
13886 13886 if (this.architecture !== 'x64' && this.architecture !== 'aarch64') {
13887 13887 throw new Error(`Unsupported architecture: ${this.architecture}`);
13888 13888 }
13889 + if (!this.stable) {
13890 + throw new Error('Early access versions are not supported');
13891 + }
13889 13892 const availableVersionsRaw = yield this.getAvailableVersions();
13890 13893 const opts = this.getPlatformOption();
13891 13894 const availableVersions = availableVersionsRaw.map(item => ({
Original file line number Diff line number Diff line change
@@ -40,6 +40,11 @@ export class MicrosoftDistributions extends JavaBase {
40 40 if (this.architecture !== 'x64' && this.architecture !== 'aarch64') {
41 41 throw new Error(`Unsupported architecture: ${this.architecture}`);
42 42 }
43 +
44 +if (!this.stable) {
45 +throw new Error('Early access versions are not supported');
46 +}
47 +
43 48 const availableVersionsRaw = await this.getAvailableVersions();
44 49
45 50 const opts = this.getPlatformOption();