fix(testing): close cypress web server correctly on windows (#22125)
This commit is contained in:
parent
6957937ec4
commit
2d9ecfd1fc
@ -75,9 +75,13 @@ function startWebServer(webServerCommand: string) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
|
if (process.platform === 'win32') {
|
||||||
|
serverProcess.kill();
|
||||||
|
} else {
|
||||||
// child.kill() does not work on linux
|
// child.kill() does not work on linux
|
||||||
// process.kill will kill the whole process group on unix
|
// process.kill will kill the whole process group on unix
|
||||||
process.kill(-serverProcess.pid, 'SIGKILL');
|
process.kill(-serverProcess.pid, 'SIGKILL');
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user