mirror of
				https://github.com/actions/setup-dotnet.git
				synced 2025-11-04 04:33:45 +00:00 
			
		
		
		
	Fix bug with qualityValidator
This commit is contained in:
		
							parent
							
								
									a20ef86ef0
								
							
						
					
					
						commit
						bdf4b09d47
					
				
							
								
								
									
										2
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							@ -198,7 +198,7 @@ class DotnetQualityValidator {
 | 
				
			|||||||
        this.qualityOptions = ['daily', 'signed', 'validated', 'preview', 'GA'];
 | 
					        this.qualityOptions = ['daily', 'signed', 'validated', 'preview', 'GA'];
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    validateQuality() {
 | 
					    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.`);
 | 
					            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;
 | 
					        return this.quality;
 | 
				
			||||||
 | 
				
			|||||||
@ -22,7 +22,7 @@ export class DotnetQualityValidator {
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  public validateQuality() {
 | 
					  public validateQuality() {
 | 
				
			||||||
    if (!this.qualityOptions.includes(this.quality)) {
 | 
					    if (this.quality && !this.qualityOptions.includes(this.quality)) {
 | 
				
			||||||
      throw new Error(
 | 
					      throw new Error(
 | 
				
			||||||
        `${this.quality} is not a supported value for 'dotnet-quality' option. Supported values are: daily, signed, validated, preview, ga.`
 | 
					        `${this.quality} is not a supported value for 'dotnet-quality' option. Supported values are: daily, signed, validated, preview, ga.`
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user