Skip to content

Commit 2ec2ab5

Browse files
Use Select-Object instead of array access to be compatible with single-CPU devices
1 parent 9f1b039 commit 2ec2ab5

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)[0].Architecture")
99+
listOf("powershell", "-NoProfile", "-Command", "(Get-WmiObject Win32_Processor | Select-Object -First 1).Architecture")
100100
} else {
101101
listOf("uname", "-m")
102102
}

0 commit comments

Comments
 (0)