diff --git a/lib/readline-sync.js b/lib/readline-sync.js index f6e5a0f..505875b 100644 --- a/lib/readline-sync.js +++ b/lib/readline-sync.js @@ -85,6 +85,7 @@ function _readlineSync(options) { if (IS_WIN) { if (process.stdin.isTTY) { + process.stdin.pause(); fdR = process.stdin.fd; ttyR = process.stdin._handle; } else { @@ -111,6 +112,7 @@ function _readlineSync(options) { } else { if (process.stdin.isTTY) { + process.stdin.pause(); try { fdR = fs.openSync('/dev/tty', 'r'); // device file, not process.stdin ttyR = process.stdin._handle; diff --git a/package.json b/package.json index f618243..c3aa9df 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "readline-sync", - "version": "1.2.13", + "version": "1.2.14", "title": "readlineSync", "description": "Synchronous Readline for interactively running to have a conversation with the user via a console(TTY).", "keywords": [