Browse files

[fix] tty.setRawMode(mode) was moved to tty.ReadStream#setRawMode() (…

…i.e. process.stdin.setRawMode())
  • Loading branch information...
1 parent bf80377 commit 427820f5c5b4358081264fa2af94014dd5678b64 @blakmatrix blakmatrix committed Jul 7, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/commander.js
View
4 lib/commander.js
@@ -900,15 +900,15 @@ Command.prototype.password = function(str, mask, fn){
mask = '';
}
- tty.setRawMode(true);
+ process.stdin.setRawMode(true);
process.stdout.write(str);
// keypress
process.stdin.on('keypress', function(c, key){
if (key && 'enter' == key.name) {
console.log();
process.stdin.removeAllListeners('keypress');
- tty.setRawMode(false);
+ process.stdin.setRawMode(false);
if (!buf.trim().length) return self.password(str, mask, fn);
fn(buf);
return;

0 comments on commit 427820f

Please sign in to comment.