From ba8e0acf5673f5c56b17b2cfdc325fbf1fd5d121 Mon Sep 17 00:00:00 2001 From: "m.kindritskiy" Date: Tue, 25 Jun 2024 10:38:27 +0300 Subject: [PATCH] fix #254 - support arm64 in --upgrade --- upgrade/registry/registry.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/upgrade/registry/registry.go b/upgrade/registry/registry.go index 2d61afa7..85dc5f68 100644 --- a/upgrade/registry/registry.go +++ b/upgrade/registry/registry.go @@ -16,6 +16,7 @@ import ( var archAdaptMap = map[string]string{ "386": "i386", "amd64": "x86_64", + "arm64": "arm64", } var osMap = map[string]string{ @@ -63,12 +64,12 @@ func (reg *GithubRegistry) GetDownloadURL(repoURI string, packageName string, ve func (reg *GithubRegistry) GetPackageName(os string, arch string) (string, error) { os = osMap[os] - arch, archExists := archAdaptMap[arch] + archAdapted, archExists := archAdaptMap[arch] if !archExists { - return "", fmt.Errorf("arch %s is not supported", arch) + return "", fmt.Errorf("architechture '%s' is not supported", arch) } - return fmt.Sprintf("lets_%s_%s", os, arch), nil + return fmt.Sprintf("lets_%s_%s", os, archAdapted), nil } func (reg *GithubRegistry) DownloadReleaseBinary(