Gradle commands in git bash sometimes output control characters #12216

Open
opened 2026-01-31 03:09:18 +00:00 by claunia · 0 comments
Owner

Originally created by @sharpau on GitHub (Jan 27, 2021).

Environment

Windows build number: Microsoft Windows [Version 10.0.21292.1010]
Windows Terminal version (if applicable): 1.4.3243.0

Any other software? git bash

Steps to reproduce

Run a command that changes text in place, such as a gradle build.

Expected behavior

Text changes in place: progress bars fill, percentages go up, etc...previous output is replaced with new output. This is what a plain git bash terminal does for me.

Actual behavior

Certain invocations of Gradle (not all, and I haven't figured out the pattern yet) will print out control characters and lose colors and replacing. For instance, I'll see something like this at the end of a gradle build:

33 actionable tasks: 1 executed, 32 up-to-date
←[0K
←[0K
←[0K
←[0K
←[0K
←[0K
←[0K
←[0K
←[8A←[1m<←[0;1m-------------> 0% WAITING←[m←[26D←[1B> IDLE←[6D←[1B> IDLE←[6D←[1B> IDLE←[6D←[1B> IDLE←[6D←[1B> IDLE←[6D←[1B> IDLE←[6D←[1B> IDLE←[6D←[1B←[8A←[2K←[1B←[2K←[1B←[2K←[1B←[2K←[1B←[2K←[1B←[2K←[1B←[2K←[1B←[2K←[7A

This is frustrating because I recently switched from ConEmu+git bash to Windows Terminal+git bash, and in every other respect it's better. But half my Gradle commands output as an unreadable mess.

The problem does not reproduce using cmd instead of git bash.

Originally created by @sharpau on GitHub (Jan 27, 2021). # Environment ``` Windows build number: Microsoft Windows [Version 10.0.21292.1010] Windows Terminal version (if applicable): 1.4.3243.0 Any other software? git bash ``` # Steps to reproduce Run a command that changes text in place, such as a gradle build. # Expected behavior Text changes in place: progress bars fill, percentages go up, etc...previous output is replaced with new output. This is what a plain git bash terminal does for me. # Actual behavior Certain invocations of Gradle (not all, and I haven't figured out the pattern yet) will print out control characters and lose colors and replacing. For instance, I'll see something like this at the end of a gradle build: ```←[32;1mBUILD SUCCESSFUL←[0;39m in 18s 33 actionable tasks: 1 executed, 32 up-to-date ←[0K ←[0K ←[0K ←[0K ←[0K ←[0K ←[0K ←[0K ←[8A←[1m<←[0;1m-------------> 0% WAITING←[m←[26D←[1B> IDLE←[6D←[1B> IDLE←[6D←[1B> IDLE←[6D←[1B> IDLE←[6D←[1B> IDLE←[6D←[1B> IDLE←[6D←[1B> IDLE←[6D←[1B←[8A←[2K←[1B←[2K←[1B←[2K←[1B←[2K←[1B←[2K←[1B←[2K←[1B←[2K←[1B←[2K←[7A ``` This is frustrating because I recently switched from ConEmu+git bash to Windows Terminal+git bash, and in every other respect it's better. But half my Gradle commands output as an unreadable mess. The problem does not reproduce using cmd instead of git bash.
claunia added the Resolution-ExternalNeeds-Tag-Fix labels 2026-01-31 03:09:18 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#12216