fix(cli): inject SPAWN_CLI_DIR in dev script so local source is always used#3429
Merged
la14-1 merged 2 commits intoMay 22, 2026
Merged
Conversation
…s used Without SPAWN_CLI_DIR, `bun run dev` downloads the spawn script from the published CDN release, ignoring any local source changes. This is especially confusing when developing on a branch with fixes that haven't been published yet. Set SPAWN_CLI_DIR to the repo root (via git rev-parse) in the dev script so the local checkout is always used during development.
Collaborator
Author
This was referenced May 21, 2026
AhmedTMM
approved these changes
May 21, 2026
la14-1
pushed a commit
that referenced
this pull request
May 22, 2026
…3428) * fix(cursor-proxy): fix double-wrapped Result hiding setup failures The error handling in setupCursorProxy and startCursorProxy used asyncTryCatchIf(isOperationalError, () => wrapSshCall(...)) which double-wrapped the Result: wrapSshCall returns Err() on failure (doesn't throw), so asyncTryCatchIf always saw a successful return and wrapped it in Ok(Err(...)). This meant result.ok was always true, causing misleading output like "Cursor proxy started" even when every step failed. Fix: call wrapSshCall directly and check its returned Result. Also adds macOS DNS cache flush after /etc/hosts modification and early-return on deploy/hosts failure with accurate warning messages. * fix(cli): inject SPAWN_CLI_DIR in dev script so local source is always used (#3429) * fix(cli): inject SPAWN_CLI_DIR in dev script so local source is always used Without SPAWN_CLI_DIR, `bun run dev` downloads the spawn script from the published CDN release, ignoring any local source changes. This is especially confusing when developing on a branch with fixes that haven't been published yet. Set SPAWN_CLI_DIR to the repo root (via git rev-parse) in the dev script so the local checkout is always used during development. * docs(cursor): add model picker and provider notes for local spawn (#3431) Add a section to sh/local/README.md noting that the "Custom model" setup option must be selected to get the OpenRouter model picker when spawning Cursor locally, and that only Cursor IDE-supported providers work (linking to Cursor's supported providers docs).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
When running
bun run devfrompackages/cli, the CLI downloads the spawn script from the published CDN release instead of using local source. This means any unpublished branch fixes (e.g. the macOS compatibility changes incursor-proxy/macos-compat) are silently ignored — the terminal shows errors from the old published code while the fixes sit unused on disk.The visible symptom is
bun run devprinting "Downloading spawn script..." and then running stale code with already-fixed bugs (wrong Caddy install path,setsidinstead ofnohup, missingsudofor/etc/hosts).Fix
Set
SPAWN_CLI_DIRto the repo root (viagit rev-parse --show-toplevel) in thedevscript so the local checkout is always used during development.Test plan
bun run devfrompackages/cli, verify "Downloading spawn script..." no longer appears