Skip to content

Commit

Permalink
Revert setRawMode on --watch ctrl-c (jestjs#5028)
Browse files Browse the repository at this point in the history
  • Loading branch information
andyearnshaw committed Feb 13, 2018
1 parent 133a9a1 commit 54c83f2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/jest-cli/src/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,9 @@ export default function watch(

const onKeypress = (key: string) => {
if (key === KEYS.CONTROL_C || key === KEYS.CONTROL_D) {
if (typeof stdin.setRawMode === 'function') {
stdin.setRawMode(false);
}
outputStream.write('\n');
exit(0);
return;
Expand Down

0 comments on commit 54c83f2

Please sign in to comment.