Skip to content

Commit 0e9d8ad

Browse files
1999juergba
authored andcommitted
tty.getWindowSize is not a function inside a "worker_threads" worker (#3955)
Use "isTTY" instead of tty.isatty(fd)
1 parent 48da42e commit 0e9d8ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/reporters/base.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ exports = module.exports = Base;
2525
* Check if both stdio streams are associated with a tty.
2626
*/
2727

28-
var isatty = tty.isatty(1) && tty.isatty(2);
28+
var isatty = process.stdout.isTTY && process.stderr.isTTY;
2929

3030
/**
3131
* Save log references to avoid tests interfering (see GH-3604).

0 commit comments

Comments
 (0)