cli/pkg/cmd
Tim Rogers a0a2567354
Suggest installing Rosetta when extension installation fails due to missing darwin-arm64 binary, but a darwin-amd64 binary is available
When installing an extension, the CLI must to select the correct
binary to download for the machine (see the
[`installBin` function](78c1d00ecc/pkg/cmd/extension/manager.go (L240))).

By default, the CLI will download a binary matching the current
machine's architecture.

However, to provide better support for Macs running on Apple
Silicon, it will
[fall back](78c1d00ecc/pkg/cmd/extension/manager.go (L267-L274))
from `darwin-arm64` to `darwin-amd64` if
[Rosetta](https://support.apple.com/en-gb/102527) (Apple's
compatibility layer) is installed.

If Rosetta isn't installed, this fallback doesn't happen, which
can lead to surprising and confusing results when one Mac has
Rosetta and another doesn't, because the extension will install
on one machine but not another.

In the situation where a `darwin-arm64` binary isn't available
but the CLI can't fall back to `amd64` because Rosetta isn't
installed, this updates our error message to suggest installing
Rosetta.

Closes https://github.com/cli/cli/issues/9592.
2024-09-11 11:50:05 +01:00
..
actions Additional formatting changes 2023-12-01 09:08:51 -05:00
alias Move config interfaces into gh package (#9060) 2024-05-10 10:39:36 +02:00
api Update documentation for gh api PATCH 2024-07-22 19:36:20 +01:00
attestation Merge pull request #9577 from cli/move-non-integration-test 2024-09-10 15:43:25 +02:00
auth document exit code behavior 2024-07-22 20:36:22 +02:00
browse Update pkg/cmd/browse/browse.go 2024-01-05 10:53:15 -04:00
cache Fix typos 2024-05-09 20:15:27 +00:00
codespace Unify use of tab indent in non-test source files 2024-08-03 00:35:30 +08:00
completion Bump github.com/spf13/cobra from v1.4.0 to v1.5.0 (#6196) 2022-09-06 09:43:40 +04:00
config Add prefer_editor_prompt config 2024-07-09 21:01:50 +09:00
extension Suggest installing Rosetta when extension installation fails due to missing darwin-arm64 binary, but a darwin-amd64 binary is available 2024-09-11 11:50:05 +01:00
factory Fix repo fork to use remote protocol if none configured 2024-05-10 10:48:36 +02:00
gist Fix tests 2024-08-16 10:11:52 -07:00
gpg-key Move config interfaces into gh package (#9060) 2024-05-10 10:39:36 +02:00
issue chore: fix some function names 2024-09-02 15:18:42 +08:00
label Fix tests 2024-08-16 10:11:52 -07:00
org Move config interfaces into gh package (#9060) 2024-05-10 10:39:36 +02:00
pr Merge pull request #9471 from heaths/issue9470 2024-08-21 14:46:52 -04:00
project Move config interfaces into gh package (#9060) 2024-05-10 10:39:36 +02:00
release Improve the help message for -F (#9525) 2024-08-28 11:00:46 -07:00
repo Merge pull request #9509 from muzimuzhi/typo/repo-sync 2024-08-28 09:29:24 -04:00
root Fix pr checks exit code (#9452) 2024-08-16 14:30:11 -07:00
ruleset Fix tests 2024-08-16 10:11:52 -07:00
run Merge pull request #9482 from benebsiny/cli-9153 2024-08-22 15:23:06 -04:00
search Merge pull request #9471 from heaths/issue9470 2024-08-21 14:46:52 -04:00
secret Fix host handling in variable and secret delete 2024-08-02 15:11:22 -04:00
ssh-key Move config interfaces into gh package (#9060) 2024-05-10 10:39:36 +02:00
status Move config interfaces into gh package (#9060) 2024-05-10 10:39:36 +02:00
variable Merge branch 'trunk' into tab-indents 2024-08-06 13:08:48 -04:00
version Fix --version flag printing to stdout 2022-05-24 16:21:13 +02:00
workflow Fix tests 2024-08-16 10:11:52 -07:00