File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 1
1
module . exports = function ( blocking ) {
2
2
[ process . stdout , process . stderr ] . forEach ( function ( stream ) {
3
- if ( stream . _handle && typeof stream . _handle . setBlocking === 'function' ) {
3
+ if ( stream . _handle && stream . isTTY && typeof stream . _handle . setBlocking === 'function' ) {
4
4
stream . _handle . setBlocking ( blocking )
5
5
}
6
6
} )
Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env node
2
2
3
+ // pretend we are a TTY
4
+ process . stdout . isTTY = true
5
+ process . stderr . isTTY = true
6
+
3
7
// see: https://github.com/yargs/yargs/issues/497
4
8
var buffer = ''
5
9
for ( var i = 0 ; i < 3000 ; i ++ ) {
Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env node
2
2
3
+ // pretend we are a TTY
4
+ process . stdout . isTTY = true
5
+ process . stderr . isTTY = true
6
+
3
7
// see: https://github.com/yargs/yargs/issues/497
4
8
var buffer = ''
5
9
for ( var i = 0 ; i < 3000 ; i ++ ) {
You can’t perform that action at this time.
0 commit comments