fix(bash): support disabled command deadlines

Treat timeout 0 as an explicit no-deadline contract across the bash tool, executor, async job, and PTY paths.

Signed-off-by: Christian Stewart <christian@aperture.us>
This commit is contained in:
Christian Stewart
2026-06-25 15:43:27 -07:00
parent 79a397e97a
commit 78d4978c51
6 changed files with 92 additions and 42 deletions
@@ -402,6 +402,15 @@ exit 64
expect(result.output).not.toContain("done");
});
it("does not arm a deadline when timeout is zero", async () => {
if (process.platform === "win32") {
return;
}
const result = await executeBash("sleep 0.1; echo done", { cwd: tempDir, timeout: 0 });
expect(result.cancelled).toBe(false);
expect(result.output.trim()).toBe("done");
});
it("aborts commands", async () => {
if (process.platform === "win32") {
return;