mirror of
				https://github.com/actions/setup-node.git
				synced 2025-10-31 16:14:00 +08:00 
			
		
		
		
	Expand current syntax to support aliases for latest version (current/latest/node) (#483)
This commit is contained in:
		
							
								
								
									
										6
									
								
								dist/setup/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								dist/setup/index.js
									
									
									
									
										vendored
									
									
								
							| @@ -62587,6 +62587,12 @@ function queryDistForMatch(versionSpec, arch = os.arch()) { | ||||
|         } | ||||
|         let versions = []; | ||||
|         let nodeVersions = yield getVersionsFromDist(); | ||||
|         if (versionSpec === 'current' || | ||||
|             versionSpec === 'latest' || | ||||
|             versionSpec === 'node') { | ||||
|             core.info(`getting latest node version...`); | ||||
|             return nodeVersions[0].version; | ||||
|         } | ||||
|         nodeVersions.forEach((nodeVersion) => { | ||||
|             // ensure this version supports your os and platform
 | ||||
|             if (nodeVersion.files.indexOf(dataFileName) >= 0) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Milos Pantic
					Milos Pantic