fix: select native Arm64 binary under Rosetta 2#9
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes macOS target detection so that Apple silicon machines running an x86_64 shell under Rosetta 2 download/use the native macos-arm64 Cloudsmith CLI binary, while preserving existing behavior on genuine Intel Macs and when the Rosetta probe is unavailable.
Changes:
- Updated
install.shtarget detection to probesysctl.proc_translatedwhenuname -mreportsx86_64/amd64on macOS. - Added Bats coverage for native, translated (Rosetta), and unavailable Rosetta probe outcomes.
- Documented the Rosetta behavior in
README.mdand noted it inCHANGELOG.md.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
install.sh |
Prefer macos-arm64 when Rosetta translation is detected under an x86_64 macOS shell. |
tests/detect_target.bats |
Adds a sysctl stub and tests covering Rosetta/native/unavailable probe outcomes. |
README.md |
Clarifies that macos-arm64 applies to Apple silicon shells running under Rosetta 2. |
CHANGELOG.md |
Notes native Arm64 selection under Rosetta 2 in the unreleased feature list. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
cloudsmith-iduffy
approved these changes
Jul 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
macos-arm64Cloudsmith CLI binary on Apple siliconmacos-x86_64selection on genuine Intel Macs and when the Rosettaprobe is unavailable
probe results
Type of change
Validation
sh -n install.shshellcheck --shell=sh --severity=style install.shbats tests/detect_target.bats— 9 tests passedbats tests/— 45 tests passedgit diff --checkCompatibility
Apple silicon Macs running the shell under Rosetta 2 now resolve to
macos-arm64instead ofmacos-x86_64. Native Apple silicon and genuine IntelMac behavior is unchanged. An explicit
--targetoverride still takesprecedence. The Windows-only PowerShell installer is unaffected.
Checklist
CHANGELOG.mdwhere appropriate.