Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Extension installation on macOS machines with Apple Silicon does not make it clear when extension installation fails because Rosetta is not installed #9592

@timrogers

Description

@timrogers

When installing an extension, the CLI must to select the correct binary to download for the machine (see the installBin function).

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 from darwin-arm64 to darwin-amd64 if Rosetta (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.

I would propose that we return a specific error message suggesting that the user installs Rosetta where:

  • a darwin-arm64 binary is not available
  • a darwin-amd64 binary is available
  • Rosetta is not installed

Steps to reproduce the behavior

  1. Try to install an extension without a darwin-arm64 binary on a Mac with Apple Silicon which doesn't have Rosetta installed:
gh extension install github/gh-gei
  1. Installation fails with an error
gh-gei unsupported for darwin-arm64. Open an issue: `gh issue create -R github/gh-gei -t'Support darwin-arm64'`
  1. Try the same thing on an Apple Silicon Mac with Rosetta installed, and installation succeeds

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions