From b21c88cfb6fb221cac27fd85276361b53254e77c Mon Sep 17 00:00:00 2001 From: Farrin Reid Date: Sat, 7 Jul 2012 03:25:59 -0800 Subject: [PATCH] [fix] tty.setRawMode(mode) was moved to tty.ReadStream#setRawMode() (i.e. process.stdin.setRawMode()) --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 2add047..181416e 100644 --- a/index.js +++ b/index.js @@ -73,7 +73,7 @@ var get = exports.get = function(options, callback){ if (key && key.name == 'enter') { console.log(); stdin.removeAllListeners('keypress'); - tty.setRawMode(false); + process.stdin.setRawMode(false); return callback(buf); } @@ -115,7 +115,7 @@ var get = exports.get = function(options, callback){ var listener = stdin._events.keypress; // to reassign down later stdin.removeAllListeners('keypress'); - tty.setRawMode(true); + process.stdin.setRawMode(true); stdout.write("\n" + prompt); wait_for_password(function(reply){