stdout is not a tty. Using bash for node + tape + tap-spec

旧街凉风 提交于 2019-12-04 20:59:29

Diagnose :

Theres nothing wrong with the code, I get the following output : (OS : ArchLinux)

  add: two numbers add correctly

    ✔ should be equal


  total:     1
  passing:   1
  duration:  14ms

Its probably a problem with Windows 7 Git Bash Shell

I read somewhere : sending output through a pipe is broken with Git Bash

To discard it run the following command :

node -p -e "Boolean(process.stdout.isTTY)"

For it to work you need the following output : true


Solution (for Windows):

$ node -p -e "Boolean(process.stdout.isTTY)"
false

Using the winpty tool, it creates a hidden console and marshals I/O between it and Cygwin/GitBashshell emulated pty :

$ winpty node -p -e "Boolean(process.stdout.isTTY)"
true

READ MORE : Node.js doesn't run as tty on windows / cygwin Issue#3006

I had same problem on console "stdout is not a tty"

This because of console, while installing Git there is an option which is choosing default terminal. Install again Git and choose terminal as Windows console and after that it should be fine.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!