Skip to content

Commit cd9a41b

Browse files
committed
Keep Forge wrapper alive until completion
1 parent ec00d2d commit cd9a41b

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

scripts/run-electron-forge.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,16 @@
22

33
import { main } from './run-electron-forge-lib.js';
44

5+
// Node 24 can terminate an otherwise-correct top-level await when Forge keeps its
6+
// work queued on promises without an active handle on Unix runners. Hold the
7+
// process open until the packaging promise settles.
8+
const keepAlive = setInterval(() => {}, 1000);
9+
510
try {
611
await main();
712
} catch (error) {
813
console.error(`[electron-forge] ${error.message}`);
914
process.exit(1);
15+
} finally {
16+
clearInterval(keepAlive);
1017
}

0 commit comments

Comments
 (0)