Skip to content

Commit 9f1b039

Browse files
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.
1 parent 092f105 commit 9f1b039

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/kotlin/com/github/gradle/node/util/PlatformHelper.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ fun main(args: Array<String>) {
9696
val osType = parseOsType(osName)
9797
val uname = {
9898
val args = if (osType == OsType.WINDOWS) {
99-
listOf("powershell", "-NoProfile", "-Command", "(Get-WmiObject Win32_Processor).Architecture")
99+
listOf("powershell", "-NoProfile", "-Command", "(Get-WmiObject Win32_Processor)[0].Architecture")
100100
} else {
101101
listOf("uname", "-m")
102102
}

0 commit comments

Comments
 (0)