Skip to content

fix(cua-driver-rs): use darwin-universal-binary in install.sh (fixes 403 on macOS) - #1516

Closed
ddupont808 wants to merge 1 commit into
mainfrom
fix/cua-driver-rs-install-macos-binary
Closed

fix(cua-driver-rs): use darwin-universal-binary in install.sh (fixes 403 on macOS)#1516
ddupont808 wants to merge 1 commit into
mainfrom
fix/cua-driver-rs-install-macos-binary

Conversation

@ddupont808

@ddupont808 ddupont808 commented May 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • The cua-driver-rs/scripts/install.sh was trying to download cua-driver-rs-{v}-darwin-{arch}-binary.tar.gz (e.g. darwin-arm64-binary, darwin-x86_64-binary) which don't exist in any release
  • The CD workflow only produces one macOS bare-binary tarball: darwin-universal-binary (arm64 + x86_64 lipo'd together)
  • GitHub's CDN returns a 4xx for the missing asset, which users reported as a 403

Fix

Added a case branch in the download section: macOS always fetches darwin-universal-binary; Linux continues to use per-arch bare binaries as before.

case "$LABEL" in
    darwin-*) TARBALL="cua-driver-rs-${VERSION}-darwin-universal-binary.tar.gz" ;;
    *)        TARBALL="cua-driver-rs-${VERSION}-${LABEL}-binary.tar.gz" ;;
esac

Verification

# These exist (302 redirect to S3):
curl -I https://github.com/trycua/cua/releases/download/cua-driver-rs-v0.1.3/cua-driver-rs-0.1.3-darwin-universal-binary.tar.gz

# This did NOT exist (404/403):
curl -I https://github.com/trycua/cua/releases/download/cua-driver-rs-v0.1.3/cua-driver-rs-0.1.3-darwin-arm64-binary.tar.gz

Test plan

  • Run install script on macOS arm64: bash libs/cua-driver-rs/scripts/install.sh
  • Run install script on macOS x86_64
  • Run install script on Linux x86_64 (should be unchanged)

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • Improvements
    • Updated installer to use universal binary distribution for macOS systems, ensuring consistent installation across all architectures.

Review Change Stack

The macOS install was downloading `cua-driver-rs-{v}-darwin-{arch}-binary.tar.gz`
which does not exist in the release — the CD workflow only produces a single
`darwin-universal-binary` tarball (arm64 + x86_64 lipo'd) for macOS, not
per-arch bare binaries. Attempting to download the missing per-arch tarball
returned a 4xx from GitHub's CDN (reported by users as a 403).

Fix: detect macOS via `LABEL` prefix and always use `darwin-universal-binary`
regardless of the host arch. Linux per-arch bare binaries continue to work
unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel

vercel Bot commented May 14, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Ignored Ignored May 14, 2026 4:06pm

Request Review

@coderabbitai

coderabbitai Bot commented May 14, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ed9a54de-d7dc-4eeb-a831-015c8b656cd6

📥 Commits

Reviewing files that changed from the base of the PR and between c173173 and 4dfffc1.

📒 Files selected for processing (1)
  • libs/cua-driver-rs/scripts/install.sh

📝 Walkthrough

Walkthrough

This PR updates the CUA driver installer script to select macOS tarballs differently. Instead of using architecture-specific tarball names for all platforms, it now routes all Darwin builds to a single darwin-universal-binary tarball while preserving per-architecture naming for Linux and other platforms.

Changes

macOS Installer Tarball Handling

Layer / File(s) Summary
macOS universal binary tarball selection
libs/cua-driver-rs/scripts/install.sh
A case statement now maps darwin-* platform labels to the darwin-universal-binary tarball, while non-macOS platforms continue using the existing ${LABEL}-binary naming scheme.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related issues

  • trycua/cua#1493: Fixes the installer attempting to download a non-existent darwin-x86_64 asset on Intel macOS by routing all Darwin builds to the universal binary tarball instead.

Possibly related PRs

  • trycua/cua#1494: Complements this change by ensuring macOS binaries are built as universal binaries through the CUA_DRIVER_PREBUILT_BINARY mechanism in the build workflow.

Poem

A script that once fumbled Darwin's name,
Now finds the universal prize without shame,
One tarball for all Apple's embrace,
Intel and ARM in a single place! 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly references the main change: using darwin-universal-binary in install.sh to fix macOS download issues (403 errors).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/cua-driver-rs-install-macos-binary

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ddupont808

Copy link
Copy Markdown
Collaborator Author

Closing — this fixes a cua-driver-rs install script bug, not the cua-driver install issue. Will track separately.

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.

2 participants