Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
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?
Attachments
Issue Links
- depends upon
-
MNG-7079 Upgrade to jansi 2.2.0 and maven-shared-utils 3.3.4
- Closed
-
MNG-7177 Upgrade Maven Shared Utils to 3.3.4
- Closed
-
MNG-7179 Upgrade Jansi to 2.3.3
- Closed
-
MSHARED-962 Upgrade Jansi to 2.0.1
- Closed
-
MSHARED-973 Upgrade Jansi to 2.2.0
- Closed
- relates to
-
MNG-6215 'mvn --encrypt-password' doesn't prompt in Git Bash
- Closed
-
MNG-6282 Console output has no colors in shell (both Git Bash and Cygwin) [regression in Jansi 1.16 / Maven 3.5.1]
- Closed