Skip to content

Commit 8eff6ce

Browse files
authored
fix(#103): restore raw mode on unblock (#104)
2 parents 956825c + cd79076 commit 8eff6ce

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@clack/core': patch
3+
---
4+
5+
fix: restore raw mode on unblock

packages/core/src/utils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export function block({
4040
return () => {
4141
input.off('keypress', clear);
4242
if (hideCursor) process.stdout.write(cursor.show);
43+
if (input.isTTY) input.setRawMode(false);
4344

4445
// @ts-expect-error fix for https://github.com/nodejs/node/issues/31762#issuecomment-1441223907
4546
rl.terminal = false;

0 commit comments

Comments
 (0)