Skip to content
This repository was archived by the owner on Feb 12, 2019. It is now read-only.

Commit 02010e1

Browse files
danielgekAndreyBelym
authored andcommitted
fix: check if terminal instance is tty (#17)
1 parent a1a14c1 commit 02010e1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,5 @@ process.stdin.on('keypress', function (ch, key) {
3535
}
3636
});
3737

38-
process.stdin.setRawMode(true);
38+
if (process.stdout.isTTY)
39+
process.stdin.setRawMode(true)

0 commit comments

Comments
 (0)