title: Bash + Node.js + stdin/stdout redirection: error "not a tty"
body: <p>This problem may be Windows-specific. I have not tested it on Linux or Mac.</p>
  
  <p>I use:</p>
  
  <ul>
  <li>Windows 7 64 Bit</li>
  <li>Node.js 8.1.3</li>
  <li>Git for Windows 2.8.1, including GNU bash, version 4.3.42(5)-release</li>
  </ul>
  
  <p><code>node my-cli.js &gt; foo.txt</code>: Error <code>output is not a tty</code></p>
  
  <p><code>node my-cli.js &lt; foo.txt</code>: Error <code>input is not a tty</code>.</p>