Update cleanup.ts

This commit is contained in:
Jacob Nguyen
2025-02-07 21:19:31 -06:00
committed by GitHub
parent d566178315
commit b3c5a9e050

View File

@@ -23,7 +23,7 @@ export function removeCleanupListener(listener: CleanupListener): boolean {
/** Executes all cleanup listeners and then exits the process. Call this instead of `process.exit` to ensure all listeners are fully executed. */
export async function exitAfterCleanup(code = 0): Promise<never> {
await executeCleanupListeners(code);
await executeCleanupListeners();
process.exit(code);
}