failing tty checks with conemu-cyg-32.exe #1240
Comments
I think you chose wrong site to request help on Gradle config. Perhaps your Gradle don't know TERM variable ConEmu exports. But the same value is exported by many other terminals. |
Well, actually it uses a native library to determine whether the console is attached to a terminal or not. The project is https://github.com/adammurdoch/native-platform, the corresponding code that returns |
I also reported it at gradle/native-platform#26 now in case it is more a problem of the detection process, but I'm still not sure which side is causing this. |
I think you misunderstood the tty detection. |
Ah, so it IS the detection that is erroneous, because it does not do the correct checks when run in the Connector or in Git Bash and thus msys, right? Can you tell me how the detection has to be done properly? |
What do you want to check? If the terminal supports ANSI on Windows? |
No, the check tries to determine whether a terminal is attached to the streams. If a terminal is attached, there is e. g. progress information and colors shown. If no terminal is attached, e. g. stdout is piped to another command, no progress information is displayed and no colors are shown. Besides that, a ConEmu specific solution is probably not the best solution if the reason it is not working correctly is the same as for Git Bash and there could be a way used that works for this situation. |
Application which was not built with cygwin/msys can't determine if there is POSIX tty on pipe handles. Perhaps it would be better to implement some switch in your tool (e.g. Hmm... Also I may try to redirect API calls to "real" handles, but all processes spawned from connector are free from ConEmuHk and you shall run them via |
BTW, there is command |
It is not my tool, I'm just a user and sometimes contributor. Just searching for a solution I could suggest and you sounded like you could have an idea. :-) |
…OSIX layer: `ConEmuC -std -c your-command`. When you run connector (or wslbridge) console handles are set into POSIX mode, and only applications directly compiled for this mode will behave as they are in tty. In other words, if you run ‘ConEmu/cygwin-connector/bash’ and try to start Python outside of cygwin folder (e.g. downloaded from https://www.python.org/downloads/), the Python will not think it was started in terminal, because it was not linked with cygwin1.dll! The command `ConEmuC -std -c python` tries to reinitialize console to work like python was started from cmd.
Versions
ConEmu build: 170819 x64
OS version: Windows 10 x64
Used shell version (Far Manager, git-bash, cmd, powershell, cygwin, whatever): GNU bash, version 4.4.12(3)-release (i686-pc-cygwin)
Problem description
When starting Cygwin terminal by invoking
conemu-cyg-32.exe
, the tty-checks of programs seem to be broken. If you e. g. start any Gradle build from plain Bash, you see progress information and colors. If you start it fromconemu-cyg-32.exe
, you don't. Interestingly the same happens in "Git Bash" from Git for Windows. There also no progress and colors are shown.The text was updated successfully, but these errors were encountered: