cli/pkg/cmd/extension
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
..
browse Move config interfaces into gh package (#9060) 2024-05-10 10:39:36 +02:00
ext_tmpls include required permissions to generate attestations 2024-08-14 15:16:45 -06:00
command.go Removed unused param flagDryRun from upgradeFunc 2024-05-16 15:41:47 -04:00
command_test.go Added summary TTY message to tests 2024-05-16 15:38:49 -04:00
extension.go gh extension install not give an error if extension already installed and a clear message (#8211) 2023-10-19 15:22:21 +02:00
extension_test.go gh extension install not give an error if extension already installed and a clear message (#8211) 2023-10-19 15:22:21 +02:00
git.go Set upstream remote to track all branches after initial fetch (#7542) 2023-06-12 09:23:56 +09:00
http.go Properly handle closing files that have been writen to (#7199) 2023-03-23 01:17:47 +00:00
manager.go 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
manager_test.go Speed up listing extensions by lazy-loading extension information when needed (#7493) 2023-06-14 09:33:18 +09:00
mocks.go Use git client in extension manager (#6547) 2022-11-10 11:38:12 +02:00
symlink_other.go go fmt 2021-12-02 16:12:24 +01:00
symlink_windows.go Rename gh extensionsgh extension 2021-08-11 22:22:39 +02:00