mirror of
				https://github.com/actions/setup-node.git
				synced 2025-10-31 16:14:00 +08:00 
			
		
		
		
	Fix: windows arm64 setup (#1126)
* Add condition to ensure ZIP extraction targets only Windows ARM64 official archives * Bumps micromatch from 4.0.5 to 4.0.8
This commit is contained in:
		| @@ -150,7 +150,7 @@ export default abstract class BaseDistribution { | ||||
|       throw err; | ||||
|     } | ||||
|  | ||||
|     const toolPath = await this.extractArchive(downloadPath, info); | ||||
|     const toolPath = await this.extractArchive(downloadPath, info, true); | ||||
|     core.info('Done'); | ||||
|  | ||||
|     return toolPath; | ||||
| @@ -210,7 +210,8 @@ export default abstract class BaseDistribution { | ||||
|  | ||||
|   protected async extractArchive( | ||||
|     downloadPath: string, | ||||
|     info: INodeVersionInfo | null | ||||
|     info: INodeVersionInfo | null, | ||||
|     isOfficialArchive?: boolean | ||||
|   ) { | ||||
|     // | ||||
|     // Extract | ||||
| @@ -225,7 +226,7 @@ export default abstract class BaseDistribution { | ||||
|       // on Windows runners without PowerShell Core. | ||||
|       // | ||||
|       // For default PowerShell Windows it should contain extension type to unpack it. | ||||
|       if (extension === '.zip') { | ||||
|       if (extension === '.zip' && isOfficialArchive) { | ||||
|         const renamedArchive = `${downloadPath}.zip`; | ||||
|         fs.renameSync(downloadPath, renamedArchive); | ||||
|         extPath = await tc.extractZip(renamedArchive); | ||||
|   | ||||
| @@ -88,7 +88,11 @@ export default class OfficialBuilds extends BaseDistribution { | ||||
|         ); | ||||
|  | ||||
|         if (downloadPath) { | ||||
|           toolPath = await this.extractArchive(downloadPath, versionInfo); | ||||
|           toolPath = await this.extractArchive( | ||||
|             downloadPath, | ||||
|             versionInfo, | ||||
|             false | ||||
|           ); | ||||
|         } | ||||
|       } else { | ||||
|         core.info( | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Priya Gupta
					Priya Gupta