Gerd Aschemann created MNG-6719:
-----------------------------------

             Summary: mvn color output escape keys w/ "| tee xxx.log" on Win 
with git/bash
                 Key: MNG-6719
                 URL: https://issues.apache.org/jira/browse/MNG-6719
             Project: Maven
          Issue Type: Bug
            Reporter: Gerd Aschemann


When output of {{mvn}} is redirected to a pipe (e.g., {{mvn verify | tee 
mvn.log}}), on Windows with git (bash), the color escape characters are written 
to the file. This works without a problem on OSX. Obviously the detection if 
the output is a tty does not work correctly with git / bash on Windows? 

The git / bash is based on MinGW64. Probably it is not a Maven problem but a 
combination of Maven / JDK / git?

Used Versions:
* git version 2.16.2.windows.1 / GNU bash, version 4.4.19(1)-release 
(x86_64-pc-msys)
* Apache Maven 3.6.1 (d66c9c0b3152b2e69ee9bac180bb8fcc8e6af555; 
2019-04-04T21:00:29+02:00)
* Java version: 1.8.0_191-1-redhat, vendor: Oracle Corporation

Probably it could also be a solution to add another CLI option? I currently use 
the {{| tee mvn.log}} approach to have both, output and log. A CLI option 
{{-L}} (as opposed to {{-l}}) could do both, output to stdout/stderr with color 
escape chars and output to a file without color escapes. What do you think?




--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to