This commit is contained in:
Simon Knott 2024-10-31 12:19:54 +01:00
parent 18f35f820a
commit 8283a09322
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC

View file

@ -104,6 +104,9 @@ export class WebServerPlugin implements TestRunnerPlugin {
stdio: 'stdin', stdio: 'stdin',
shell: true, shell: true,
attemptToGracefullyClose: async () => { attemptToGracefullyClose: async () => {
if (process.platform === 'win32')
throw new Error('Graceful shutdown is not supported on Windows');
const success = launchedProcess.kill('SIGINT'); const success = launchedProcess.kill('SIGINT');
if (!success) if (!success)
throw new Error(`SIGINT didn't succeed, fall back to non-graceful shutdown`); throw new Error(`SIGINT didn't succeed, fall back to non-graceful shutdown`);