[READ-ONLY] Mirror of https://github.com/bombshell-dev/clack. Effortlessly build beautiful command-line apps bomb.sh/docs/clack/basics/getting-started/
cli command-line command-line-app node prompt prompts
5

Configure Feed

Select the types of activity you want to include in your feed.

fix(@clack/core): keyboard input not working after await in spinner

Bruno Rocha (Dec 15, 2023, 4:49 PM -0300) a04e4189 90f8e3d7

+10 -1
+5
.changeset/olive-walls-clean.md
··· 1 + --- 2 + '@clack/core': patch 3 + --- 4 + 5 + fix(@clack/core): keyboard input not working after await in spinner
+5 -1
packages/core/src/utils.ts
··· 4 4 import * as readline from 'node:readline'; 5 5 import { cursor } from 'sisteransi'; 6 6 7 + const isWindows = globalThis.process.platform.startsWith('win'); 8 + 7 9 export function block({ 8 10 input = stdin, 9 11 output = stdout, ··· 40 42 return () => { 41 43 input.off('keypress', clear); 42 44 if (hideCursor) process.stdout.write(cursor.show); 43 - if (input.isTTY) input.setRawMode(false); 45 + 46 + // Prevent Windows specific issues: https://github.com/natemoo-re/clack/issues/176 47 + if (input.isTTY && !isWindows) input.setRawMode(false); 44 48 45 49 // @ts-expect-error fix for https://github.com/nodejs/node/issues/31762#issuecomment-1441223907 46 50 rl.terminal = false;