Skip to content

Commit

Permalink
Properly await all exit tasks (#611)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andarist authored Jul 9, 2024
1 parent 8cd22ea commit 53c2258
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/shared/src/process/exitProcess.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { exitTasks } from "./exitTask";

export async function exitProcess(code?: number): Promise<never> {
await Promise.all(exitTasks);
await Promise.all(exitTasks.map(task => task()));

process.exit(code);
}

0 comments on commit 53c2258

Please sign in to comment.