mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-04-28 11:59:29 +00:00
fix: add ~/.npm-global/bin to OpenClaw PATH for gateway, launch, and reconnect (#1972)
* fix: add ~/.npm-global/bin to OpenClaw PATH for gateway, launch, and reconnect OpenClaw installs to ~/.npm-global/bin/ via npm, but startGateway() and launchCmd() only included ~/.bun/bin and ~/.local/bin in PATH — so the `openclaw` binary was never found on non-Fly clouds (DigitalOcean, Hetzner, AWS, GCP). Fly was unaffected because it uses setupOpenclawBatched() which correctly includes the npm-global path. Three fixes: 1. startGateway(): add $HOME/.npm-global/bin to PATH 2. launchCmd(): add $HOME/.npm-global/bin to PATH 3. install(): persist PATH to ~/.bashrc and ~/.zshrc (matching codex/kilocode pattern) so reconnects via `spawn openclaw <cloud> --name ...` also work Closes #1965 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: correct command chaining and idempotency in npm-global PATH setup - Use curly braces to group grep||echo so PATH append only runs after successful npm install (fixes operator precedence bug) - Skip ~/.zshrc modification when file doesn't exist (avoids creating it on non-zsh systems) - Use grep -qF for literal string matching (no regex interpretation) - Apply fix to all three affected agents: openclaw, codex, kilocode Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude <claude@anthropic.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: B <6723574+louisgv@users.noreply.github.com>
This commit is contained in:
parent
e2f40b3d8b
commit
cb4e6839b7
2 changed files with 8 additions and 6 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@openrouter/spawn",
|
||||
"version": "0.10.25",
|
||||
"version": "0.10.26",
|
||||
"type": "module",
|
||||
"bin": {
|
||||
"spawn": "cli.js"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue