mirror of
				https://gitea.com/actions/setup-node.git
				synced 2025-10-29 15:52:42 +08:00 
			
		
		
		
	chore: trim no matter what
This commit is contained in:
		| @@ -495,17 +495,16 @@ function translateArchToDistUrl(arch: string): string { | ||||
| } | ||||
|  | ||||
| export function parseNodeVersionFile(contents: string): string { | ||||
|   let nodeVersion; | ||||
|   let nodeVersion = contents.trim(); | ||||
|  | ||||
|   if (contents.includes('volta')) { | ||||
|     nodeVersion = JSON.parse(contents).volta.node; | ||||
|   } else { | ||||
|     nodeVersion = contents.trim(); | ||||
|   } | ||||
|  | ||||
|   if (/^v\d/.test(nodeVersion)) { | ||||
|     nodeVersion = nodeVersion.substring(1); | ||||
|   } | ||||
|  | ||||
|   return nodeVersion; | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user