New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MINGW64 not supported #36
Comments
What do you get when running the following: $ node -p -e "Boolean(process.stdout.isTTY)" |
That is unexpected though, because I messed with the source earlier and made the following change to if (process.stdout && !process.stdout.isTTY) {
console.log('I\'m not a TTY');
return 0;
} Which would have the following result:
|
I don't see why those checks would return differently... |
Ah, I guess it's because |
What does the following return?
|
|
Hmm, I'm out of ideas. Can you make sure you're running the latest version of Node.js and the latest version of Git for Windows (follow nodejs/node#3006 (comment)). |
I was some minimal updates behind, but updated both now:
The result is still the same. So, what I'm taking away from the issue you linked is that this is basically an issue of stdout not being identified as a TTY because MINGW does some piping in the background and is thus not a real TTY. My environment above seems to indicate that MINGW will set |
Node.js 6.1.0 is the latest. Try that.
I considered that. That's why I asked for the environment variables, but I realized that if we do this, it will still output colors if you actually pipe, which would be unexpected and incorrect. Regardless, you would save yourself a lot of pain by just installing real Bash: https://blogs.windows.com/buildingapps/2016/03/30/run-bash-on-ubuntu-on-windows/ |
Oh well, yeah, I'll probably give the new Windows 10 Bash a try. Thanks |
Just out of curiosity, do you have CYGWIN installed? I'd like to see if this is happening on your system with it vs. msys. I wouldn't be surprised if msys was doing some strange piping. |
@Qix- I have CYGWIN as well, yeah. It doesn't have this problem:
Different machine, but I doubt that has any relevance here. I don't know why I decided at some point to use MINGW instead of CYGWIN. It definitely wasn't color support, that's for sure :P |
MinGW is definitely superior in my personal opinion. |
Thanks for the tip :) |
To be clear: the MinGW builds for LLVM/CLang are superior. I prefer CYGWIN for everything else, i.e. the command line. But then again I haven't used either of those for about a year now. 👍 |
I think this is a wontfix unfortunately - yes we can probably test specifically for MinGW, but we still wouldn't be able to detect if it was a TTY we were outputting to or some other program. That's a distinction you will have to make yourself via environment variables. If you open a ticket with the MSYS group I'll definitely chime in on it. @sindresorhus does that sound about right? |
Yes |
Any updates on this issue? On Cygwin I get: $ node -p -e "Boolean(process.stdout.isTTY)"
false
$ tput.exe colors
8
$ supports-color; echo $?
1
$ tty.exe
/dev/pty1
I wonder if this problem have anything to do with the terminal being a pseudo terminal? |
When I use chalk (or anything else that depends on this module), output is not colored by default and must be forced with CLI arguments.
The text was updated successfully, but these errors were encountered: