From 5ad9ce34e3143f91cbfcf261d7bc46c3cd03029d Mon Sep 17 00:00:00 2001 From: Anton Golub Date: Sat, 6 Apr 2024 21:53:13 +0300 Subject: [PATCH] fix: additional `process.kill` fallback for bun (#770) https://github.com/oven-sh/bun/issues/8787 --- package-lock.json | 10 +++++----- package.json | 4 ++-- src/core.ts | 6 +++++- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 98f48e4996..befba29cbb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@types/node": ">=20.11.30", "@types/which": "^3.0.3", "@webpod/ingrid": "^0.0.0-beta.3", - "@webpod/ps": "^0.0.0-beta.2", + "@webpod/ps": "^0.0.0-beta.3", "c8": "^9.1.0", "chalk": "^5.3.0", "depseek": "^0.4.1", @@ -43,7 +43,7 @@ }, "optionalDependencies": { "@types/fs-extra": "^11.0.4", - "@types/node": ">=20.12.4" + "@types/node": ">=20.12.5" } }, "node_modules/@babel/code-frame": { @@ -509,9 +509,9 @@ "dev": true }, "node_modules/@webpod/ps": { - "version": "0.0.0-beta.2", - "resolved": "https://registry.npmjs.org/@webpod/ps/-/ps-0.0.0-beta.2.tgz", - "integrity": "sha512-vN7MQWZ3kaEulflp17ySPHjkIlEMfIP2KDMekiTazgAJQxHCY+QyZ+wJ120LJ/t/h4aGxv8u3Z6amBGeurF5iQ==", + "version": "0.0.0-beta.3", + "resolved": "https://registry.npmjs.org/@webpod/ps/-/ps-0.0.0-beta.3.tgz", + "integrity": "sha512-PSWQN/GFAoU91TPC8SkF+Ok6NKYLnDwdz1KbXtKlkzRXxnr2f+FOm7CprMJSa19s75WuunvgGGwZCY96Py2HkA==", "dev": true, "dependencies": { "@webpod/ingrid": "^0.0.0-beta.2", diff --git a/package.json b/package.json index bf7b13e7bc..ac8d794352 100644 --- a/package.json +++ b/package.json @@ -53,14 +53,14 @@ }, "optionalDependencies": { "@types/fs-extra": "^11.0.4", - "@types/node": ">=20.12.4" + "@types/node": ">=20.12.5" }, "devDependencies": { "@types/fs-extra": "^11.0.4", "@types/minimist": "^1.2.5", "@types/node": ">=20.11.30", "@types/which": "^3.0.3", - "@webpod/ps": "^0.0.0-beta.2", + "@webpod/ps": "^0.0.0-beta.3", "@webpod/ingrid": "^0.0.0-beta.3", "c8": "^9.1.0", "chalk": "^5.3.0", diff --git a/src/core.ts b/src/core.ts index 9c5fabc1e7..8cbdf5f16b 100644 --- a/src/core.ts +++ b/src/core.ts @@ -589,7 +589,11 @@ export async function kill(pid: number, signal?: string) { } try { process.kill(-pid, signal) - } catch (e) {} + } catch (e) { + try { + process.kill(+pid, signal) + } catch (e) {} + } } export type LogEntry =