fix(cua-driver): parse uninstall.sh under macOS /bin/bash (bash 3.2) - #1723
Conversation
bash 3.2 — the /bin/bash shipped on macOS and the shell the documented
install/uninstall one-liner invokes — does not skip here-document bodies
when scanning a $( ... ) command substitution. The Rust-branch Python
here-doc (python3 <<'PY') carried three apostrophes in comments
("Swift's", "it's", "shouldn't"), an odd count, so bash 3.2 entered a
phantom single-quoted string while hunting for the closing ) and ran to
end of file:
uninstall.sh: line 324: unexpected EOF while looking for matching `)'
uninstall.sh: line 694: syntax error: unexpected end of file
Reword those three comment lines to drop the contractions/possessives so
the here-doc no longer contains unbalanced single quotes. The Swift
branch's equivalent here-doc was already apostrophe-free, which is why
only the Rust branch tripped. No behavioral change; `bash -n` now passes
under bash 3.2.57.
|
@DHMin is attempting to deploy a commit to the Cua Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe uninstall script's Python-based Claude MCP scrubber logic has its inline documentation clarified. A comment explaining how the ChangesUninstall Script Comment Update
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
What
Fixes the cua-driver uninstaller
libs/cua-driver/scripts/uninstall.shso it parses under bash 3.2 — the/bin/bashshipped on macOS and the exact shell the documented one-liner invokes (/bin/bash -c "$(curl -fsSL …/uninstall.sh)").Closes #1722.
Why
Under bash 3.2.57 the script aborts before doing anything:
bash 3.2 has a parser bug where a here-document inside a
$( … )command substitution is not skipped while scanning for the closing). The Rust-branch Python here-doc (python3 <<'PY') carried three apostrophes in comments —Swift's,it's,shouldn't— an odd count, so bash 3.2 entered a phantom single-quoted string, never matched the), and ran to EOF. The Swift branch's equivalent here-doc was already apostrophe-free, which is why only the Rust branch tripped. bash 4+/5+ (e.g. Homebrew bash) parse it correctly, so it only bites users running the documented/bin/bashflow.Change
Reword those three comment lines to drop the contractions/possessives so the here-doc no longer contains unbalanced single quotes. No behavioral change — comments only.
Verification
Summary by CodeRabbit