This commit is contained in:
Benjamin Toby
2025-02-21 09:00:49 +01:00
parent 7d71316b2c
commit 4540404522
15 changed files with 103 additions and 43 deletions
+3 -3
View File
@@ -1,6 +1,6 @@
import { ChildProcess } from "child_process";
import colors from "./console-colors";
import kill from "kill-port";
import killPort from "kill-port";
/**
* ## Kill Child Process Function
@@ -21,10 +21,10 @@ export default async function killChild(
if (typeof port == "object" && port?.[0]) {
for (let i = 0; i < port.length; i++) {
const singlePort = port[i];
await kill(Number(singlePort));
await killPort(Number(singlePort), "tcp");
}
} else if (port) {
await kill(Number(port));
await killPort(Number(port), "tcp");
}
} catch (error) {}