Skip to content

Commit e457d68

Browse files
committed
fix: process2.kill("SIGABRT") not supported on windows
1 parent 6f44c23 commit e457d68

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

packages/blitz/src/cli/utils/next-utils.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import {ChildProcess} from "child_process"
22
import {spawn} from "cross-spawn"
3+
import os from "os"
34
import detect from "detect-port"
45
import path from "path"
56
import {existsSync, readJSONSync} from "fs-extra"
@@ -127,7 +128,13 @@ export function startCustomServer(
127128
console.log("\n")
128129
//@ts-ignore -- incorrect TS type from node
129130
process.exitCode = RESTART_CODE
130-
process.kill("SIGABRT")
131+
// Check if the system is Windows
132+
if (os.platform() === "win32") {
133+
// Windows doesn't support SIGABRT, use SIGINT instead
134+
process.kill("SIGINT")
135+
} else {
136+
process.kill("SIGABRT")
137+
}
131138
}
132139
},
133140
}

0 commit comments

Comments
 (0)