fix(coding-agent): redirect ssh stdin to avoid mux fd errors

Fixes #154.
This commit is contained in:
can1357
2026-02-24 02:08:22 +01:00
parent 86f3d1b42f
commit fb150a9e39
2 changed files with 20 additions and 0 deletions
@@ -0,0 +1,19 @@
import { describe, expect, it } from "bun:test";
import { buildRemoteCommand } from "../../src/ssh/connection-manager";
describe("buildRemoteCommand", () => {
it("includes -n to bind stdin to /dev/null for mux channel opens", async () => {
const args = await buildRemoteCommand(
{
name: "host",
host: "192.168.3.146",
},
"ls -la",
);
expect(args[0]).toBe("-n");
expect(args).toContain("ControlMaster=auto");
expect(args.at(-2)).toBe("192.168.3.146");
expect(args.at(-1)).toBe("ls -la");
});
});