From 9f1b039a9624bc9bcead8d6838a5062af92c5ae5 Mon Sep 17 00:00:00 2001 From: Alan Everett Date: Sun, 10 May 2026 19:19:34 -0400 Subject: [PATCH] Only use architecture of first CPU Some VMs expose multiple cores as multiple CPUs, which breaks the current check for architecture type. This isolates the first CPU, fixing the incompatibility. --- src/main/kotlin/com/github/gradle/node/util/PlatformHelper.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/com/github/gradle/node/util/PlatformHelper.kt b/src/main/kotlin/com/github/gradle/node/util/PlatformHelper.kt index ad641def..7802d894 100644 --- a/src/main/kotlin/com/github/gradle/node/util/PlatformHelper.kt +++ b/src/main/kotlin/com/github/gradle/node/util/PlatformHelper.kt @@ -96,7 +96,7 @@ fun main(args: Array) { val osType = parseOsType(osName) val uname = { val args = if (osType == OsType.WINDOWS) { - listOf("powershell", "-NoProfile", "-Command", "(Get-WmiObject Win32_Processor).Architecture") + listOf("powershell", "-NoProfile", "-Command", "(Get-WmiObject Win32_Processor)[0].Architecture") } else { listOf("uname", "-m") }