From 091ae005dd297373284de4a4fa8f5c4efcd2bc8a Mon Sep 17 00:00:00 2001 From: "Donghyeok Min (Dylan)" Date: Wed, 27 May 2026 01:19:25 +0900 Subject: [PATCH] fix(cua-driver): parse uninstall.sh under macOS /bin/bash (bash 3.2) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- libs/cua-driver/scripts/uninstall.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/cua-driver/scripts/uninstall.sh b/libs/cua-driver/scripts/uninstall.sh index a53141f670..a070afcdf4 100755 --- a/libs/cua-driver/scripts/uninstall.sh +++ b/libs/cua-driver/scripts/uninstall.sh @@ -361,9 +361,9 @@ def invokes_cua_driver_rs(server): # explicit ".cua-driver-rs" segment. Plain "cua-driver" alone is # ambiguous (the Swift binary uses the same filename). The shared # /Applications/CuaDriver.app path is ALSO ambiguous (Rust took - # over Swift's bundle id) — only count it as Rust when a Rust - # install marker is on disk; otherwise it's almost certainly a - # Swift registration we shouldn't scrub. + # over the Swift bundle id) — only count it as Rust when a Rust + # install marker is on disk; otherwise it is almost certainly a + # Swift registration we should not scrub. if home_dir and home_dir in joined: return True if "CuaDriverRs.app" in joined or ".cua-driver-rs" in joined or "cua-driver-rs" in joined: