Fix bug with qualityValidator

This commit is contained in:
IvanZosimov 2022-08-16 19:13:25 +02:00
parent a20ef86ef0
commit bdf4b09d47
2 changed files with 2 additions and 2 deletions

2
dist/index.js vendored
View File

@ -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;

View File

@ -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.`
);