You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Guillaume Nodet (Jira)" <ji...@apache.org> on 2022/10/20 08:11:02 UTC

[jira] [Updated] (MNG-6719) mvn color output escape keys w/ "| tee xxx.log" on Win with git/bash

     [ https://issues.apache.org/jira/browse/MNG-6719?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet updated MNG-6719:
---------------------------------
    Fix Version/s: 4.0.0-alpha-2

> 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
>            Assignee: Guillaume Nodet
>            Priority: Major
>             Fix For: 3.8.2, 4.0.0-alpha-1, 4.0.0-alpha-2, 4.0.0
>
>
> 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
(v8.20.10#820010)