Skip to content

Commit

Permalink
handle readline close properly
Browse files Browse the repository at this point in the history
  • Loading branch information
FredKSchott committed Jun 3, 2020
1 parent 3ffb036 commit eb129d6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/commands/paint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,9 @@ export function paint(
devMode.addPackage(missingWebModule.pkgName);
repaint();
});
// readline can swallow CTRL-C exits, so pipe to the main process.
// @ts-ignore: @types/node doesn't seem to recognize the '"SIGINT"' event
rl.on('SIGINT', () => process.emit('SIGINT'));
rl.on('close', function () {
process.exit(0);
});
}

repaint();
Expand Down

0 comments on commit eb129d6

Please sign in to comment.