better windows compat

This commit is contained in:
Emmaline Autumn 2023-10-08 15:28:35 -06:00
parent a85d8fc1f8
commit 19fa51bacb

View File

@ -6,18 +6,30 @@ export const getServerStartCommands = (
): Deno.Command => {
switch (loader) {
case "forge":
return new Deno.Command(
Deno.build.os === "windows" ? "./run.bat" : "./run.sh",
// "pwd",
{
args: [
"nogui",
],
stdin: "piped",
stdout: "piped",
cwd: "./" + instance,
},
);
return Deno.build.os === "windows"
? new Deno.Command(
"cmd.exe",
{
args: [
"./run.bat",
"nogui",
],
stdin: "piped",
stdout: "piped",
cwd: "./" + instance,
},
)
: new Deno.Command(
"./run.sh",
{
args: [
"nogui",
],
stdin: "piped",
stdout: "piped",
cwd: "./" + instance,
},
);
case "vanilla":
case "unset":
case "fabric":