From bdf4b09d47cf6a2c2fa6fd398080e5e565d061cd Mon Sep 17 00:00:00 2001 From: IvanZosimov Date: Tue, 16 Aug 2022 19:13:25 +0200 Subject: [PATCH] Fix bug with qualityValidator --- dist/index.js | 2 +- src/installer.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 805c713..9b59115 100644 --- a/dist/index.js +++ b/dist/index.js @@ -198,7 +198,7 @@ class DotnetQualityValidator { this.qualityOptions = ['daily', 'signed', 'validated', 'preview', 'GA']; } validateQuality() { - if (!this.qualityOptions.includes(this.quality)) { + if (this.quality && !this.qualityOptions.includes(this.quality)) { throw new Error(`${this.quality} is not a supported value for 'dotnet-quality' option. Supported values are: daily, signed, validated, preview, ga.`); } return this.quality; diff --git a/src/installer.ts b/src/installer.ts index df87b18..d7e7105 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -22,7 +22,7 @@ export class DotnetQualityValidator { } public validateQuality() { - if (!this.qualityOptions.includes(this.quality)) { + if (this.quality && !this.qualityOptions.includes(this.quality)) { throw new Error( `${this.quality} is not a supported value for 'dotnet-quality' option. Supported values are: daily, signed, validated, preview, ga.` );