From c81be0621d46f1be51b6372a9596029901ceffbe Mon Sep 17 00:00:00 2001 From: Shantanu Date: Thu, 24 Jul 2025 22:44:42 -0700 Subject: [PATCH] fix universal binary support for arm --- checksum/checksum.go | 3 ++- upgrade.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/checksum/checksum.go b/checksum/checksum.go index 741ed25..0ab075a 100644 --- a/checksum/checksum.go +++ b/checksum/checksum.go @@ -119,8 +119,9 @@ func WithOS(os string) ValidatorOption { } var fallbackArchMap = map[string][]string{ - "amd64": {"x86_64", "all"}, + "amd64": {"x86_64"}, "386": {"i386", "all"}, + "arm64": {"all"}, } func WithArch(a string) ValidatorOption { diff --git a/upgrade.go b/upgrade.go index f8ab5cd..6c5675c 100644 --- a/upgrade.go +++ b/upgrade.go @@ -58,8 +58,9 @@ func NewUpgrader(owner string, repo string, executablePath string, opts ...Opt) executablePath: executablePath, releaseGetter: release.NewReleaseGetter(repo, owner), assetDownloader: asset.NewAssetDownloader(executablePath, asset.WithLookupArchFallback(map[string][]string{ - "amd64": {"x86_64", "all"}, + "amd64": {"x86_64"}, "386": {"i86", "all"}, + "arm64": {"all"}, })), checksumDownloader: checksum.NewCheckSumDownloader(), checksumValidator: checksum.NewCheckSumValidator(),