fix(cua-driver-rs)(install): _install-local-rust.sh uses the .cua-driver/ home (matches v0.2.16+ runtime) - #1711
Conversation
…ver/ home (matches v0.2.16+ runtime) Picks up the home-dir rename that landed in v0.2.16 (PR #1644) but missed this Bash dev-installer helper. Before this fix, every `./install-local.sh` on macOS/Linux re-created a stale `~/.cua-driver-rs/` directory parallel to the canonical `~/.cua-driver/` (the runtime sweeps the legacy path on first call but the local installer kept planting fresh copies). Changes: - `HOME_DIR` defaults to `${CUA_DRIVER_HOME:-${CUA_DRIVER_RS_HOME:-$HOME/.cua-driver}}`. The legacy `CUA_DRIVER_RS_HOME` env var is still accepted so any dev scripts that set it keep working. - Same backcompat for `CUA_DRIVER_INSTALL_DIR` / `CUA_DRIVER_BIN_DIR` (the `_RS_` variants remain accepted as fallbacks). - LaunchAgent label: `com.trycua.cua-driver-rs` → `com.trycua.cua-driver`. Same .plist filename change. - systemd user unit: `cua-driver-rs.service` → `cua-driver.service`. Plus three sweep blocks that delete the pre-rename artefacts: 1. `~/.cua-driver-rs/` directory (unconditional, only if HOME_DIR differs — so users with the env var set keep their override). 2. The legacy LaunchAgent plist (unloaded + removed before the new plist is written, so the new label doesn't race the old one). 3. The legacy systemd unit (disabled + removed before the new unit is written, same race-avoidance). The runtime already sweeps the legacy home on first invocation (see telemetry.rs::migrate_legacy_telemetry_home + the LEGACY_HOME_SUBDIRECTORY constant introduced in PR #1644 / #1683) so this fix is belt-and-braces on the installer side. After this PR ships: - Existing developers re-running `./install-local.sh` get the legacy home dir cleaned up automatically. - New installs only ever plant the canonical `~/.cua-driver/`. Tested locally on this Mac (arm64-apple-darwin): $ ls -d ~/.cua-driver-rs # → does not exist (swept) $ ls -la ~/.cua-driver/packages/current # → symlink to ../releases/0.0.0-local-debug-arm64-apple-darwin $ ~/.local/bin/cua-driver --version # → cua-driver 0.2.18 Header comments / banner / staged-skills paths that contain the verbatim string "cua-driver-rs" as a project identifier (not a path) intentionally retained — that's still the cargo crate name + the historical home subdir name in skill-pack staging. Only the *user- visible install paths* changed. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe local Rust installer script is updated to migrate from legacy ChangesLocal installer autostart naming and path migration
Possibly related PRs
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Summary
Picks up the home-dir rename that landed in v0.2.16 (PR #1644) but missed this Bash dev-installer helper. Before this fix, every
./install-local.shon macOS/Linux re-created a stale~/.cua-driver-rs/directory parallel to the canonical~/.cua-driver/. The Windows.ps1and the productioninstall.shalready had the rename.Bug repro (before this fix)
What this fixes
HOME_DIRnow defaults to${CUA_DRIVER_HOME:-${CUA_DRIVER_RS_HOME:-$HOME/.cua-driver}}. The legacyCUA_DRIVER_RS_HOMEenv var is still accepted so any dev scripts that set it keep working.CUA_DRIVER_INSTALL_DIR/CUA_DRIVER_BIN_DIR(the_RS_variants remain accepted as fallbacks).com.trycua.cua-driver-rs→com.trycua.cua-driver. Same .plist filename change.cua-driver-rs.service→cua-driver.service.Sweep blocks (legacy cleanup)
Three blocks remove the pre-rename artefacts so existing developers get a clean migration on first re-run:
~/.cua-driver-rs/directory — unconditional sweep (only ifHOME_DIRdiffers, so users with the env var set keep their override).The runtime already sweeps the legacy home on first invocation (see
telemetry.rs::migrate_legacy_telemetry_home+ theLEGACY_HOME_SUBDIRECTORYconstant introduced in PR #1644 / #1683) — this fix is belt-and-braces on the installer side.Verification (after this fix, same machine)
What's intentionally NOT renamed
Strings that contain the verbatim "cua-driver-rs" as a project identifier (not a user-visible install path) were left alone:
${BOLD}${BLUE}cua-driver-rs local installer${NORMAL}— still the project / cargo workspace nameSkills/cua-driver-rs— that's a directory inside the staged install, not a user home path; renaming that needs a separate coordinated change with_install-rust.shand thecua-driver skills installruntime resolverIf you want those renamed too, that's a separate follow-up — this PR only fixes the user-visible install dirs and autostart unit names.
Test plan
bash -n libs/cua-driver/scripts/_install-local-rust.shclean~/.cua-driver-rs/left behindWhy dev-only
This is
_install-local-rust.sh, called frominstall-local.sh, which is the developer / checked-out-tree installer. The productioninstall.sh(curl-pipe-bash) was already migrated to.cua-driver/in PR #1644 — only this helper was overlooked.🤖 Generated with Claude Code
Summary by CodeRabbit