From 645d97c0ce03fa8ec658937fc1ef7c9e005adafc Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Wed, 18 Dec 2024 16:16:15 +0000 Subject: [PATCH] fix(dev): use `SIGTERM` instead of `SIGHUP` on windows --- src/commands/dev.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/commands/dev.ts b/src/commands/dev.ts index afc99b40c..3198149af 100644 --- a/src/commands/dev.ts +++ b/src/commands/dev.ts @@ -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: [