-
Notifications
You must be signed in to change notification settings - Fork 140
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
Does not work with Git CMD on Windows #119
Comments
please run "java -jar jansi-*.jar" and report the result: this is a diagnostic utility to display what is enabled and why |
Here it is:
|
looks like ANSI code rendering during the diagnostic utility was enabled: do you confirm? if it works during diagnostic but not during Maven execution, I'm a little puzzled... |
Yes, the ANSI code rendering is enabled both when the diagnostic utility and Maven are run. And that is the trouble. Git CMD(not to be confused with Git Bash) uses cmd.exe (the Windows command prompt) and it does not support ANSI escape characters. As a result instead of the artwork the ANSI codes are printed. Here is the full output (with the artwork)
It appears that the problem comes from the code introduced with bb3d538. The following evaluates to true:
because Git CMD sets p.s. For reference I'm applying the output of the utility when run on cmd.exe (the regular Windows command prompt without the variables set by Git CMD and indeed without
When the |
ok, using this Do you see a way to make the difference? How should we code the test? |
I think we can use p.s. |
added a check on BASH env variable, since Git Bash is what we are looking for to disable Windows trickery |
Now on git bash the ANSI codes are stripped. That is strange because:
but when I debug JANSI |
grrrr... I hate that there is a pseudo env variable... and I didn't check because I'm not on Windows usually... Thanks a lot for your feedback |
When I run Maven using Git CMD on Windows I'm seeing the escape characters printed on the console:
I suspect the reason is because
MSYSTEM
is set toMINGW64
. If I unset it the output is fine. I wonder if there is a way to detect that the terminal used is CMD and it does not support ANSI escape character?The text was updated successfully, but these errors were encountered: