Skip to content

Commit 33e4a3f

Browse files
committed
test(ssh): validate fixture cleanup PIDs
1 parent 9f514fa commit 33e4a3f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎packages/ssh/src/tunnel.test.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,10 @@ describe("ssh tunnel scripts", () => {
111111
Effect.tap((pids) =>
112112
Effect.sync(() => {
113113
for (const pid of pids.trim().split("\n")) {
114+
const target = Number(pid);
115+
if (!Number.isInteger(target) || target <= 0) continue;
114116
try {
115-
process.kill(Number(pid), "SIGTERM");
117+
process.kill(target, "SIGTERM");
116118
} catch {
117119
// The fixture may already have exited after a failed launch.
118120
}

0 commit comments

Comments
 (0)