add warning if go-version is empty (#350)
This commit is contained in:
		
							parent
							
								
									b27d76912e
								
							
						
					
					
						commit
						ebfdf6ac95
					
				
							
								
								
									
										3
									
								
								dist/setup/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								dist/setup/index.js
									
									
									
									
										vendored
									
									
								
							| @ -63609,6 +63609,9 @@ function run() { | |||||||
|                 core.debug(`add bin ${added}`); |                 core.debug(`add bin ${added}`); | ||||||
|                 core.info(`Successfully set up Go version ${versionSpec}`); |                 core.info(`Successfully set up Go version ${versionSpec}`); | ||||||
|             } |             } | ||||||
|  |             else { | ||||||
|  |                 core.info('[warning]go-version input was not specified. The action will try to use pre-installed version.'); | ||||||
|  |             } | ||||||
|             const goPath = yield io.which('go'); |             const goPath = yield io.which('go'); | ||||||
|             const goVersion = (child_process_1.default.execSync(`${goPath} version`) || '').toString(); |             const goVersion = (child_process_1.default.execSync(`${goPath} version`) || '').toString(); | ||||||
|             if (cache && cache_utils_1.isCacheFeatureAvailable()) { |             if (cache && cache_utils_1.isCacheFeatureAvailable()) { | ||||||
|  | |||||||
| @ -54,6 +54,10 @@ export async function run() { | |||||||
|       const added = await addBinToPath(); |       const added = await addBinToPath(); | ||||||
|       core.debug(`add bin ${added}`); |       core.debug(`add bin ${added}`); | ||||||
|       core.info(`Successfully set up Go version ${versionSpec}`); |       core.info(`Successfully set up Go version ${versionSpec}`); | ||||||
|  |     } else { | ||||||
|  |       core.info( | ||||||
|  |         '[warning]go-version input was not specified. The action will try to use pre-installed version.' | ||||||
|  |       ); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     const goPath = await io.which('go'); |     const goPath = await io.which('go'); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user