[Commented] (MNG-6282) Console output has no colors in shell (both Git Bash and Cygwin) [regression in Jansi 1.16 / Maven 3.5.1]

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Commented] (MNG-6282) Console output has no colors in shell (both Git Bash and Cygwin) [regression in Jansi 1.16 / Maven 3.5.1]

JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/MNG-6282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16164182#comment-16164182 ]

Hervé Boutemy commented on MNG-6282:
------------------------------------

I just had a look at JAnsi code: {{mvn -Djansi.passthrough=true}} should activate color
(or {{java -Djansi.passthrough=true -ja jansi-*.jar}} with the test: notice that color is here, even if characters are completely screwed, because of encoding issues, but this is not important here)

explanation: currently, when MinTTY (aka GitBash, MINGW) or Cygwin are detected, ANSI escape code are simply stripped from System.out.
I don't understand why it was coded like this, since these shell natively support ANSI escape code (without Windows native code trickery that is activated with cmd.exe or PowerShell)

Then {{jansi.passthrough=true}} just drop the whole detection and stripping: it just let System.out as-is, with its ANSI escape code that GitBash and Cygwin bash can interpret natively

I'll add this explanation in GitHub issue tracker tonight, since all this belongs to JAnsi...

> Console output has no colors in shell (both Git Bash and Cygwin) [regression in Jansi 1.16 / Maven 3.5.1]
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: MNG-6282
>                 URL: https://issues.apache.org/jira/browse/MNG-6282
>             Project: Maven
>          Issue Type: Bug
>          Components: Logging
>    Affects Versions: 3.5.1
>            Reporter: Dejan Stojadinović
>              Labels: regression, windows
>         Attachments: screenshot-1.png, screenshot-2.png, screenshot-3.png, screenshot-4.png, screenshot-5-Cygwin.png
>
>
> See [screenshot|https://issues.apache.org/jira/secure/attachment/12886398/screenshot-1.png] for more details.
> _*Environment:*_
> * Windows 10, 64 bit
> * Oracle Java, version: *1.8.0_144*
> * Git Bash shell (MINGW64), Cygwin



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)