Skip to content

Commit 017620f

Browse files
authored
fix: resolve installer stall and add clear completion signal (#91)
* fix: resolve installer stall and add clear completion signal After the last wizard prompt, Node's event loop stayed alive because promptChoiceList resumed stdin via emitKeypressEvents but never paused it in cleanup(). The process appeared hung even though all output had been written. Users had to force-quit before reading the completion text. - pause stdin in promptChoiceList cleanup so the event loop can drain - add process.exit() under IS_MAIN as a hard backstop against future leaks - upgrade completion banner to bold green ✓ and add an explicit "Setup complete — this session will now exit." line so users know the wizard finished intentionally * fix: remove process.exit() — stdin.pause() is sufficient process.exit() can truncate buffered stdout/stderr in piped or redirected usage before streams fully flush. The stdin.pause() in promptChoiceList cleanup already lets the event loop drain naturally; the forced exit was unnecessary backstop that introduced data-loss risk.
1 parent 2915854 commit 017620f

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

bin/lib/init-flow.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,11 @@ export function createCmdInit(ctx) {
122122
writeManifest(ctx.planningDir, manifest);
123123
console.log(' - wrote generation manifest');
124124

125-
console.log('\nGSDD initialized.');
125+
console.log('\n\x1B[1m\x1B[32m✓ GSDD initialized.\x1B[0m');
126126
printInitSummary(interactiveSession.config ?? buildDefaultConfig({ autoAdvance: isAuto }));
127127
console.log('Next: choose the starting lane that fits your repo and current scope:\n');
128128
printPostInitRouting(interactiveSession.selectedRuntimes);
129+
console.log('\nSetup complete — this session will now exit.');
129130
};
130131
}
131132

bin/lib/init-prompts.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ export async function promptChoiceList({ input, output, title, hint = 'Use arrow
198198
const cleanup = () => {
199199
input.off('keypress', onKeypress);
200200
if (typeof input.setRawMode === 'function') input.setRawMode(previousRawMode);
201+
if (typeof input.pause === 'function') input.pause();
201202
};
202203

203204
const onKeypress = (_, key = {}) => {

0 commit comments

Comments
 (0)