From 00dadbb3d541c58858a48ee67e89ed20732b181a Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Thu, 24 Oct 2024 11:23:21 -0700 Subject: [PATCH] explicit close on end --- tests/index.test.ts | 1 - wrapper.ts | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/index.test.ts b/tests/index.test.ts index 5a0a627..4fc5d6e 100644 --- a/tests/index.test.ts +++ b/tests/index.test.ts @@ -59,7 +59,6 @@ describe( command: '/bin/echo', args: [message], onExit: (err, exitCode) => { - console.log('huhhh') expect(err).toBeNull(); expect(exitCode).toBe(0); expect(buffer.trim()).toBe(message); diff --git a/wrapper.ts b/wrapper.ts index 3b31ff3..6f829a3 100644 --- a/wrapper.ts +++ b/wrapper.ts @@ -79,6 +79,7 @@ export class Pty { return; } + this.close(); this.#fdEnded = true; exitResult.then((result) => { console.log('calling real exit')