diff --git a/pkg/cmd/extension/manager.go b/pkg/cmd/extension/manager.go index 0ab429c2e..60fe8d239 100644 --- a/pkg/cmd/extension/manager.go +++ b/pkg/cmd/extension/manager.go @@ -263,12 +263,18 @@ func (m *Manager) installBin(repo ghrepo.Interface, target string) error { } } - // if an arm64 binary is unavailable, fall back to amd64 if it can be executed through Rosetta 2 - if asset == nil && isMacARM && hasRosetta() { + // if using an ARM-based Mac and an arm64 binary is unavailable, fall back to amd64 if a relevant binary is available and Rosetta 2 is installed + if asset == nil && isMacARM { for _, a := range r.Assets { if strings.HasSuffix(a.Name, "darwin-amd64") { - asset = &a - break + if hasRosetta() { + asset = &a + break + } else { + return fmt.Errorf( + "%[1]s unsupported for %[2]s. Install Rosetta with `softwareupdate --install-rosetta` to use the available darwin-amd64 binary, or open an issue: `gh issue create -R %[3]s/%[1]s -t'Support %[2]s'`", + repo.RepoName(), platform, repo.RepoOwner()) + } } } }