Refactor execSync and spawn calls to include windowsHide option for better compatibility on Windows environments.

This commit is contained in:
decolua
2026-04-14 11:48:59 +07:00
parent 04cdb75839
commit 1fa05eb2ab
8 changed files with 45 additions and 34 deletions
+1 -1
View File
@@ -222,7 +222,7 @@ const server = https.createServer(sslOptions, async (req, res) => {
// Kill any process occupying LOCAL_PORT before binding
function killPort(port) {
try {
const pids = execSync(`lsof -ti :${port}`, { encoding: "utf-8" }).trim();
const pids = execSync(`lsof -ti :${port}`, { encoding: "utf-8", windowsHide: true }).trim();
if (!pids) return;
const pidList = pids.split("\n");
pidList.forEach(pid => {