Skip to content

Commit 3b7dec0

Browse files
committed
fix: keep shutdown logs
1 parent 07934e2 commit 3b7dec0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/createSpawn.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,11 @@ export const createSpawn = (
117117

118118
if (abortSignal) {
119119
const kill = () => {
120-
processPromise.kill();
120+
// eslint-disable-next-line promise/prefer-await-to-then
121+
processPromise.kill().finally(() => {
122+
processPromise.stdout.off('data', onStdout);
123+
processPromise.stderr.off('data', onStderr);
124+
});
121125
};
122126

123127
abortSignal.addEventListener('abort', kill, {

0 commit comments

Comments
 (0)