Skip to content

Commit

Permalink
Add an error condition for an unstable Microsoft OpenJDK build (#263)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-shibanov committed Dec 15, 2021
1 parent 8d22286 commit d23aed3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dist/setup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 => ({
Expand Down
5 changes: 5 additions & 0 deletions src/distributions/microsoft/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit d23aed3

Please sign in to comment.