mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-04-28 11:59:29 +00:00
fix: add missing PATH entries in Hetzner and DigitalOcean runServer/interactiveSession (#2450)
AWS and GCP both include $HOME/.npm-global/bin and $HOME/.claude/local/bin in the PATH exported before running remote commands. Hetzner and DO were missing these two entries, causing "command not found" errors for Claude Code and npm-global packages on those clouds. Agent: code-health Co-authored-by: B <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
1bddd713ea
commit
a46a92a8a4
3 changed files with 5 additions and 5 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@openrouter/spawn",
|
||||
"version": "0.15.38",
|
||||
"version": "0.15.39",
|
||||
"type": "module",
|
||||
"bin": {
|
||||
"spawn": "cli.js"
|
||||
|
|
|
|||
|
|
@ -1124,7 +1124,7 @@ export async function waitForCloudInit(ip?: string, maxAttempts = 60): Promise<v
|
|||
|
||||
export async function runServer(cmd: string, timeoutSecs?: number, ip?: string): Promise<void> {
|
||||
const serverIp = ip || _state.serverIp;
|
||||
const fullCmd = `export PATH="$HOME/.local/bin:$HOME/.bun/bin:$PATH" && ${cmd}`;
|
||||
const fullCmd = `export PATH="$HOME/.npm-global/bin:$HOME/.claude/local/bin:$HOME/.local/bin:$HOME/.bun/bin:$PATH" && ${cmd}`;
|
||||
const keyOpts = getSshKeyOpts(await ensureSshKeys());
|
||||
|
||||
const proc = Bun.spawn(
|
||||
|
|
@ -1200,7 +1200,7 @@ export async function interactiveSession(cmd: string, ip?: string): Promise<numb
|
|||
const term = sanitizeTermValue(process.env.TERM || "xterm-256color");
|
||||
// Single-quote escaping prevents premature shell expansion of $variables in cmd
|
||||
const shellEscapedCmd = cmd.replace(/'/g, "'\\''");
|
||||
const fullCmd = `export TERM=${term} PATH="$HOME/.local/bin:$HOME/.bun/bin:$PATH" && exec bash -l -c '${shellEscapedCmd}'`;
|
||||
const fullCmd = `export TERM=${term} PATH="$HOME/.npm-global/bin:$HOME/.claude/local/bin:$HOME/.local/bin:$HOME/.bun/bin:$PATH" && exec bash -l -c '${shellEscapedCmd}'`;
|
||||
const keyOpts = getSshKeyOpts(await ensureSshKeys());
|
||||
|
||||
const exitCode = spawnInteractive([
|
||||
|
|
|
|||
|
|
@ -555,7 +555,7 @@ export async function waitForCloudInit(ip?: string, maxAttempts = 60): Promise<v
|
|||
|
||||
export async function runServer(cmd: string, timeoutSecs?: number, ip?: string): Promise<void> {
|
||||
const serverIp = ip || _state.serverIp;
|
||||
const fullCmd = `export PATH="$HOME/.local/bin:$HOME/.bun/bin:$PATH" && ${cmd}`;
|
||||
const fullCmd = `export PATH="$HOME/.npm-global/bin:$HOME/.claude/local/bin:$HOME/.local/bin:$HOME/.bun/bin:$PATH" && ${cmd}`;
|
||||
const keyOpts = getSshKeyOpts(await ensureSshKeys());
|
||||
|
||||
const proc = Bun.spawn(
|
||||
|
|
@ -632,7 +632,7 @@ export async function interactiveSession(cmd: string, ip?: string): Promise<numb
|
|||
const term = sanitizeTermValue(process.env.TERM || "xterm-256color");
|
||||
// Single-quote escaping prevents premature shell expansion of $variables in cmd
|
||||
const shellEscapedCmd = cmd.replace(/'/g, "'\\''");
|
||||
const fullCmd = `export TERM=${term} PATH="$HOME/.local/bin:$HOME/.bun/bin:$PATH" && exec bash -l -c '${shellEscapedCmd}'`;
|
||||
const fullCmd = `export TERM=${term} PATH="$HOME/.npm-global/bin:$HOME/.claude/local/bin:$HOME/.local/bin:$HOME/.bun/bin:$PATH" && exec bash -l -c '${shellEscapedCmd}'`;
|
||||
|
||||
const keyOpts = getSshKeyOpts(await ensureSshKeys());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue