Skip to content

fix(cli): select arm64 binary under Rosetta - #18

Merged
cyhhao merged 1 commit into
mainfrom
fix/issue-552-rosetta-platform
Jun 11, 2026
Merged

fix(cli): select arm64 binary under Rosetta#18
cyhhao merged 1 commit into
mainfrom
fix/issue-552-rosetta-platform

Conversation

@cyhhao

@cyhhao cyhhao commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

What

  • Detect macOS Rosetta translation when selecting askill release artifacts.
  • Install and self-update to darwin-arm64 on Apple Silicon even when the current shell or process reports x64.
  • Keep native Intel macOS on darwin-x64, and preserve existing Linux/Windows platform mapping.

Why

Issue avibe-bot/avibe#552 reports askill crashing after a recent update on Apple Silicon when the x86_64 binary is installed under Rosetta. The direct failure mode is that process architecture is not the same as hardware architecture on translated macOS processes, so installer/upgrade logic can choose the wrong artifact.

Validation

  • npm test
  • npm run build
  • Simulated Rosetta installer run with mocked uname -m=x86_64 and sysctl.proc_translated=1; installer selected darwin-arm64, downloaded an arm64 Mach-O binary, and askill --version returned 0.1.14.

Notes

The existing darwin-x64 Bun artifact can still warn about AVX requirements under Rosetta. This PR prevents Apple Silicon/Rosetta users from receiving that x64 artifact in the first place. If we also want to support older Intel CPUs without AVX, that should be handled separately by publishing a baseline x64 build.

@github-actions github-actions Bot added the fix label Jun 11, 2026
@cyhhao
cyhhao marked this pull request as ready for review June 11, 2026 18:03
@cyhhao
cyhhao merged commit 8c8ef9a into main Jun 11, 2026
1 check passed
@cyhhao
cyhhao deleted the fix/issue-552-rosetta-platform branch June 11, 2026 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant