Fix: stream mode conflict

This commit is contained in:
anseki 2015-04-26 16:05:54 +09:00
parent 64e65b27d3
commit 56e1a7d3d1
2 changed files with 3 additions and 1 deletions

View file

@ -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;

View file

@ -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": [