More Windows support testing

This commit is contained in:
00Fjongl 2024-08-07 15:36:18 -05:00
parent 6b9b889b0e
commit 3f6872f810
2 changed files with 13 additions and 1 deletions

View file

@ -27,7 +27,7 @@ for(let i = 2; i < process.argv.length; i++)
console.log(stdout);
});
else if (process.platform === "win32")
exec("START", ['""', "node", "backend.js"], (error, stdout) => {
exec("START", ["/MIN", '""', '"node backend.js"'], (error, stdout) => {
if (error) throw error;
console.log(stdout);
});
@ -81,7 +81,18 @@ for(let i = 2; i < process.argv.length; i++)
break;
}
case "kill":
if (process.platform === "win32")
exec("taskkill", ["/F", "/IM", "node*"], (error, stdout) => {
console.log(stdout);
});
else exec("pkill", ["node"], (error, stdout) => {
console.log(stdout);
});
break;
// No default case.
}