Add an error condition for an unstable Microsoft OpenJDK build (#263)

This commit is contained in:
Dmitry Shibanov 2021-12-15 18:23:49 +03:00 committed by GitHub
parent 8d22286106
commit d23aed3c80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

3
dist/setup/index.js vendored
View File

@ -13886,6 +13886,9 @@ class MicrosoftDistributions extends base_installer_1.JavaBase {
if (this.architecture !== 'x64' && this.architecture !== 'aarch64') {
throw new Error(`Unsupported architecture: ${this.architecture}`);
}
if (!this.stable) {
throw new Error('Early access versions are not supported');
}
const availableVersionsRaw = yield this.getAvailableVersions();
const opts = this.getPlatformOption();
const availableVersions = availableVersionsRaw.map(item => ({

View File

@ -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('Early access versions are not supported');
}
const availableVersionsRaw = await this.getAvailableVersions();
const opts = this.getPlatformOption();