mirror of
				https://github.com/actions/setup-node.git
				synced 2025-11-04 13:43:35 +00:00 
			
		
		
		
	checks implemented for node version file
This commit is contained in:
		
							parent
							
								
									34ece939a3
								
							
						
					
					
						commit
						6382f41129
					
				
							
								
								
									
										11
									
								
								src/main.ts
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								src/main.ts
									
									
									
									
									
								
							@ -74,6 +74,17 @@ function isGhes(): boolean {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function resolveVersionInput(): string {
 | 
					function resolveVersionInput(): string {
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					  if(!(core.getInput('node-version') || core.getInput('version')))
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    core.error('No specified file exists')
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if(core.getInput('node-version') && core.getInput('version'))
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    core.warning('Both version and node-version-file are specified')
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  let version = core.getInput('node-version') || core.getInput('version');
 | 
					  let version = core.getInput('node-version') || core.getInput('version');
 | 
				
			||||||
  if (version) {
 | 
					  if (version) {
 | 
				
			||||||
    return version;
 | 
					    return version;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user