Skip to content

Commit f5c39a8

Browse files
committed
chore: Document known issue with setRawMode(true). Closes #1721
1 parent daf4d6f commit f5c39a8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/prompts/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,11 @@ The context options are:
181181
| clearPromptOnDone | `boolean` | no | If true, we'll clear the screen after the prompt is answered |
182182
| signal | `AbortSignal` | no | An AbortSignal to cancel prompts asynchronously |
183183

184+
> [!WARNING]
185+
> When providing an input stream or piping `process.stdin`, it's very likely you need to call `process.stdin.setRawMode(true)`
186+
> before calling inquirer functions. Node.js usually does it automatically, but when we shadow the stdin, Node can loss track
187+
> and not know it has to. If the prompt isn't interactive (arrows don't work, etc), it's likely due to this.
188+
184189
Example:
185190

186191
```js

0 commit comments

Comments
 (0)