From 94ca0cafc44192ef192e520d90379e8e1ec4be59 Mon Sep 17 00:00:00 2001 From: Gianluca Boiano Date: Sun, 20 Oct 2024 21:49:01 +0200 Subject: [PATCH] fix: utils/os: align architecture with pacman ones --- pkg/utils/os.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/utils/os.go b/pkg/utils/os.go index 0d44a0d..07d1366 100644 --- a/pkg/utils/os.go +++ b/pkg/utils/os.go @@ -4,13 +4,13 @@ import ( "runtime" ) -// GetArchitecture returns the corresponding uname -m output for the current GOARCH. +// GetArchitecture returns the corresponding pacman architecture for the current GOARCH. func GetArchitecture() string { - // Create a map of GOARCH values to uname -m outputs + // Create a map of GOARCH values to pacman arch ones architectureMap := map[string]string{ "amd64": "x86_64", - "386": "i386", - "arm": "armv7l", // Common for ARM 32-bit + "386": "i686", + "arm": "armv7h", // Common for ARM 32-bit "arm64": "aarch64", // Common for ARM 64-bit "ppc64": "ppc64", "ppc64le": "ppc64le", @@ -24,8 +24,8 @@ func GetArchitecture() string { // Get the current architecture using runtime.GOARCH currentArch := runtime.GOARCH - // Get the corresponding uname -m output from the map - unameOutput := architectureMap[currentArch] + // Get the corresponding pacman architecture from the map + pacmanArch := architectureMap[currentArch] - return unameOutput + return pacmanArch }