Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing windows arm64 arch detection #43475

Merged
merged 1 commit into from
Apr 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 8 additions & 5 deletions pkg/platform/architecture_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ type systeminfo struct {

// Constants
const (
ProcessorArchitecture64 = 9 // PROCESSOR_ARCHITECTURE_AMD64
ProcessorArchitectureIA64 = 6 // PROCESSOR_ARCHITECTURE_IA64
ProcessorArchitecture32 = 0 // PROCESSOR_ARCHITECTURE_INTEL
ProcessorArchitectureArm = 5 // PROCESSOR_ARCHITECTURE_ARM
ProcessorArchitecture64 = 9 // PROCESSOR_ARCHITECTURE_AMD64
ProcessorArchitectureIA64 = 6 // PROCESSOR_ARCHITECTURE_IA64
ProcessorArchitecture32 = 0 // PROCESSOR_ARCHITECTURE_INTEL
ProcessorArchitectureArm = 5 // PROCESSOR_ARCHITECTURE_ARM
ProcessorArchitectureArm64 = 12 // PROCESSOR_ARCHITECTURE_ARM64
)

// runtimeArchitecture gets the name of the current architecture (x86, x86_64, …)
Expand All @@ -47,8 +48,10 @@ func runtimeArchitecture() (string, error) {
return "i686", nil
case ProcessorArchitectureArm:
return "arm", nil
case ProcessorArchitectureArm64:
return "arm64", nil
default:
return "", fmt.Errorf("Unknown processor architecture")
return "", fmt.Errorf("unknown processor architecture %+v", sysinfo.wProcessorArchitecture)
}
}

Expand Down