Gradlew Printing Control Characters with Git Bash

I am using git-bash as Integrated terminal in Intellij Idea Community Edition(2020). The Gradlew Downloaded is 5.2.1

When I run something like gradlew build

It prints some random text like the screenshot attached.

Initially I thought it has something to do with gradlew but then I tried building using CMD from Explorer it worked prefectly.

Then I even tried to build it with git-bash from Explorer and it worked. I tried using CMD as Integrated Terminal in IntelliJ and it worked with CMD as well.

I am not able to figure out what is wrong with git-bash and IntelliJ combination Any Help will be appreciated.

EDIT 1: Downgrading Git-bash for windows from 2.28.0 to 2.26.2 worked for me. Removing IntelliJ tag from Question.

I think there has to be some problem with git-bash 2.28.0

1

2 Answers

This started happening to me in VSCode and IntelliJ when i recently updated Git, I reverted to an older version of Git and it went away. I did notice they made some updates to the bash shell.

Using TERM=cygwin ./gradlew build resolved the issue in both those environments for me.

4

Thanks @docslax. This is how I fixed it on Android Studio.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Sophia Al-Mansoor

Sophia Al-Mansoor

Global Business & E-Commerce Reporter

Sophia analyzes international trade, startup ecosystems, retail transformation, and supply chain logistics for modern digital publications.

Share this article
Twitter Facebook Pinterest