Skip to content

Commit

Permalink
Fix stdin(4) detection on Windows
Browse files Browse the repository at this point in the history
Closes GH-118.
Closes GH-119.
  • Loading branch information
wooorm committed Jan 2, 2016
1 parent aa364e0 commit c2562bc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/cli/file-set-pipeline/stdin.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ var concat = require('concat-stream');
*/

var isTTY = process.stdin.isTTY;
var isFIFO = fs.fstatSync(0).isFIFO();
var isFIFO;

try { isFIFO = fs.fstatSync(0).isFIFO(); } catch (e) { /* Empty */ }

var definitelyTTY = isTTY === true || isFIFO === true;
var expextPipeIn = !isTTY;
Expand Down

0 comments on commit c2562bc

Please sign in to comment.