jonschlinkert/window-size

does not work if stderr is not a TTY

Closed this issue · 2 comments

console.log(require('window-size'))

Running this works fine if stderr is a TTY (not piped). If I run with node example.js ^/dev/null (fish syntax), both width and height are undefined.

afaict line 18 is the problem.

afaict line 18 is the problem.

Line 18 is a conditional, not a problem. Since you didn't suggest an alternative, I'm guessing this is a feature request?

afaict line 18 is the problem.

Ok, let me rephrase it: The problem lies within line 18.

Since you didn't suggest an alternative, I'm guessing this is a feature request?

I will make a PR to just remove it, except if there's a specific reason why this check exists.