Update cypress/support/run-e2e-specs.js
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>pull/6257/head
parent
0d38db18e3
commit
f873562667
|
|
@ -125,11 +125,13 @@ async function main() {
|
|||
try {
|
||||
// Use SIGTERM first, then SIGKILL if needed
|
||||
hugoProc.kill('SIGTERM');
|
||||
setTimeout(() => {
|
||||
const timeoutId = setTimeout(() => {
|
||||
if (!hugoProc.killed) {
|
||||
hugoProc.kill('SIGKILL');
|
||||
}
|
||||
}, 1000);
|
||||
// Clear the timeout if the process exits cleanly
|
||||
hugoProc.on('exit', () => clearTimeout(timeoutId));
|
||||
} catch (err) {
|
||||
console.error(`Error killing Hugo process: ${err.message}`);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue