fix(ssh): remove remote mcp config via trap when the tile kills ssh

This commit is contained in:
mika kuns
2026-10-02 15:30:12 +02:00
parent 4b1f5c65c3
commit b35755e1f0
2 changed files with 4 additions and 3 deletions
@@ -1692,7 +1692,7 @@ public sealed class InteractiveLaunchSpecServiceTests : IDisposable
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);
Assert.Contains($"trap 'rm -f ~/.claudedo/mcp-{paneId}.json' EXIT HUP TERM && ", remote);
var b64 = System.Text.RegularExpressions.Regex.Match(remote, @"echo ([A-Za-z0-9+/=]+) \| base64 -d").Groups[1].Value;
using var json = System.Text.Json.JsonDocument.Parse(Convert.FromBase64String(b64));