fix(worker): put ~/.local/bin on PATH for remote claude in ssh sessions
This commit is contained in:
@@ -335,8 +335,9 @@ public sealed class InteractiveLaunchSpecService
|
||||
var cfgFile = $"~/.claudedo/mcp-{paneId}.json";
|
||||
|
||||
// No double quotes anywhere: ConPTY flattens Args into one Windows command line.
|
||||
// ssh runs a non-interactive shell whose .bashrc bails early, so the native installer's ~/.local/bin is added by hand.
|
||||
var remote =
|
||||
$"umask 077 && mkdir -p ~/.claudedo && echo {b64} | base64 -d > {cfgFile}" +
|
||||
$"export PATH=$HOME/.local/bin:$PATH && umask 077 && mkdir -p ~/.claudedo && echo {b64} | base64 -d > {cfgFile}" +
|
||||
$" && cd {SshWorkspace.QuoteRemotePath(ws.RemotePath)}" +
|
||||
$" && MCP_TOOL_TIMEOUT={McpToolTimeoutMs} claude --mcp-config {cfgFile}; rm -f {cfgFile}";
|
||||
|
||||
|
||||
@@ -1689,6 +1689,7 @@ public sealed class InteractiveLaunchSpecServiceTests : IDisposable
|
||||
Assert.DoesNotContain(spec.Args, a => a.Contains('"'));
|
||||
|
||||
var remote = spec.Args[6];
|
||||
Assert.StartsWith("export PATH=$HOME/.local/bin:$PATH && ", remote);
|
||||
Assert.Contains("cd ~/'app'", remote);
|
||||
Assert.Contains($"MCP_TOOL_TIMEOUT={InteractiveLaunchSpecService.McpToolTimeoutMs} claude --mcp-config ~/.claudedo/mcp-{paneId}.json", remote);
|
||||
Assert.EndsWith($"rm -f ~/.claudedo/mcp-{paneId}.json", remote);
|
||||
|
||||
Reference in New Issue
Block a user