Skip to content

Commit

Permalink
Merge pull request #260 from lets-cli/issue-254
Browse files Browse the repository at this point in the history
fix #254 - support arm64 in --upgrade
  • Loading branch information
kindermax authored Jun 25, 2024
2 parents 7582cae + ba8e0ac commit 6797988
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions upgrade/registry/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
var archAdaptMap = map[string]string{
"386": "i386",
"amd64": "x86_64",
"arm64": "arm64",
}

var osMap = map[string]string{
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 6797988

Please sign in to comment.