Skip to content

Commit

Permalink
fix(dev): use SIGTERM instead of SIGHUP on windows (#603)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored Dec 18, 2024
1 parent 952e3c7 commit 1e1a59c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/commands/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,13 @@ async function _startSubprocess(devProxy: DevProxy, rawArgs: string[]) {
}

const restart = async () => {
// Kill previous process with restart signal
kill('SIGHUP')
// Kill previous process with restart signal (not supported on Windows)
if (process.platform === 'win32') {
kill('SIGTERM')
}
else {
kill('SIGHUP')
}
// Start new process
childProc = fork(globalThis.__nuxt_cli__!.entry!, ['_dev', ...rawArgs], {
execArgv: [
Expand Down

0 comments on commit 1e1a59c

Please sign in to comment.