Skip to content

Commit 490723b

Browse files
authored
Fix windows architecture detection on mutli-processors system
1 parent 7787635 commit 490723b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

1k/1kiss.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,8 @@ $osVerString = if ($IsWin) { "Microsoft Windows $($NtOSVersion.ToString())" } el
340340
# arm64,x64
341341
# uname -m: arm64/aarch64,x86_64
342342
if ($IsWin) {
343-
$__1k_archs = @{9="x64"; 10="arm64"}
344-
$__1k_arch_code = [int](Get-CimInstance Win32_Processor).Architecture[0]
343+
$__1k_archs = @{9="x64"; 12="arm64"}
344+
$__1k_arch_code = [int](Get-CimInstance -ClassName Win32_Processor -ErrorAction Stop | Select-Object -First 1).Architecture
345345
$HOST_CPU = $__1k_archs[$__1k_arch_code]
346346
} else {
347347
$HOST_CPU = [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString().ToLower()

0 commit comments

Comments
 (0)