diff --git a/dist/setup/index.js b/dist/setup/index.js index d2533dab..64328d97 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -13890,7 +13890,8 @@ class MicrosoftDistributions extends base_installer_1.JavaBase { throw new Error('Early access versions are not supported'); } if (this.packageType !== 'jdk') { - throw new Error(`${this.packageType} versions are not supported`); + 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.'); } const availableVersionsRaw = yield this.getAvailableVersions(); const opts = this.getPlatformOption(); diff --git a/src/distributions/microsoft/installer.ts b/src/distributions/microsoft/installer.ts index 6b42a03f..6f20a8a3 100644 --- a/src/distributions/microsoft/installer.ts +++ b/src/distributions/microsoft/installer.ts @@ -46,7 +46,10 @@ export class MicrosoftDistributions extends JavaBase { } if (this.packageType !== 'jdk') { - throw new Error(`${this.packageType} versions are not supported`); + 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.' + ); } const availableVersionsRaw = await this.getAvailableVersions();