From c19e9dcac3d200094c770521b9b1b10df76f26c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Boutemy?= Date: Mon, 25 Sep 2017 22:52:48 +0200 Subject: [PATCH] [MNG-6242] detect Cygwin/Mingw pseudo terminal for Jansi --- apache-maven/src/bin/mvn | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn index fa6164b26e..e3a5848a77 100755 --- a/apache-maven/src/bin/mvn +++ b/apache-maven/src/bin/mvn @@ -188,6 +188,14 @@ export MAVEN_PROJECTBASEDIR MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" export MAVEN_CMD_LINE_ARGS +# detect cygwin or mingw pseudo-terminal for Jansi +# workaround for https://github.com/fusesource/jansi-native/issues/11 +if $cygwin || $mingw; then + if [ -t 1 ]; then + MAVEN_OPTS="-Djansi.passthrough=true $MAVEN_OPTS" + fi +fi + exec "$JAVACMD" \ $MAVEN_OPTS \ $MAVEN_DEBUG_OPTS \