From f185ccd3ba9b270d2610d7104e978c3085a177e6 Mon Sep 17 00:00:00 2001 From: Dmitry Shibanov Date: Mon, 20 Dec 2021 18:32:00 +0300 Subject: [PATCH] change warning to error --- dist/setup/index.js | 3 +-- src/distributions/microsoft/installer.ts | 5 +---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/dist/setup/index.js b/dist/setup/index.js index 64328d97..34b866d8 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -13890,8 +13890,7 @@ class MicrosoftDistributions extends base_installer_1.JavaBase { throw new Error('Early access versions are not supported'); } if (this.packageType !== 'jdk') { - this.packageType = 'jdk'; - core.warning('Microsoft Build of OpenJDK always uses the `jdk` package type. Remove the `java-package` argument when calling the action to silence this warning.'); + throw new Error('Microsoft Build of OpenJDK provides only the `jdk` package type'); } const availableVersionsRaw = yield this.getAvailableVersions(); const opts = this.getPlatformOption(); diff --git a/src/distributions/microsoft/installer.ts b/src/distributions/microsoft/installer.ts index 6f20a8a3..147c543f 100644 --- a/src/distributions/microsoft/installer.ts +++ b/src/distributions/microsoft/installer.ts @@ -46,10 +46,7 @@ export class MicrosoftDistributions extends JavaBase { } if (this.packageType !== 'jdk') { - this.packageType = 'jdk'; - core.warning( - 'Microsoft Build of OpenJDK always uses the `jdk` package type. Remove the `java-package` argument when calling the action to silence this warning.' - ); + throw new Error('Microsoft Build of OpenJDK provides only the `jdk` package type'); } const availableVersionsRaw = await this.getAvailableVersions();