Gradle output is heavily garbled when using Windows Terminal + Git Bash #9879

Closed
opened 2026-01-31 02:06:30 +00:00 by claunia · 2 comments
Owner

Originally created by @hobindar on GitHub (Jul 27, 2020).

Environment

Windows build number: 10.0.18362.0
Windows Terminal version (if applicable): 1.1.2021.0

Any other software?
- Bash provided by Git Bash 2.27.0 (relevant settings.json included at the end of this bug report)
- Gradle 6.2.1 (and many other versions, including 6.4.1)

Steps to reproduce

  • Apply settings.json (at end of this bug report) to Windows Terminal
  • Restart Windows Terminal
  • You will be in a Bash terminal by default
  • Clone https://github.com/hobindar/noclassdef-sample
  • From the project root, run ./gradlew assembleDebug
  • Observe heavily garbled output

Note there are some unknown steps for getting Windows Terminal into this state. This used to work just fine, but it stopped working either after a Windows Terminal update, some automatically applied Windows update, or some other unknown action. Uninstalling and then installing does not fix the issue. Downgrading Windows Terminal to the last known good version, 1.0.1811.0, does not fix the issue. All gradle projects are affected. None of the gradle projects have been modified (at all) since their last known good state.

Expected behavior

Output should look like this:
image

Actual behavior

Output is heavily garbled and instead looks like this:
image


Note that someone has also filed this bug on gradle's bug tracker: https://github.com/gradle/gradle/issues/13279


settings.json:

// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation

{
    "$schema": "https://aka.ms/terminal-profiles-schema",

    "defaultProfile": "{00000000-0000-0000-ba54-000000000002}",

    "profiles": {
        "defaults": {
            // Put settings here that you want to apply to all profiles
        },
        "list": [
            {
                // Make changes here to the powershell.exe profile
                "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
                "name": "Windows PowerShell",
                "commandline": "powershell.exe",
                "hidden": false
            },
            {
                // Make changes here to the cmd.exe profile
                "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
                "name": "cmd",
                "commandline": "cmd.exe",
                "hidden": false
            },
            {
                "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
                "hidden": false,
                "name": "Azure Cloud Shell",
                "source": "Windows.Terminal.Azure"
            },
            {
                "guid": "{00000000-0000-0000-ba54-000000000002}",
                "background": "#000000",
                "closeOnExit": true,
                "colorScheme": "Campbell",
                "commandline": "\"%PROGRAMFILES%\\git\\usr\\bin\\bash.exe\" -i -l",
                "cursorColor": "#FFFFFF",
                "cursorShape": "bar",
                "fontFace": "Consolas",
                "fontSize": 10,
                "historySize": 9001,
                "icon": "ms-appx:///ProfileIcons/{0caa0dad-35be-5f56-a8ff-afceeeaa6101}.png",
                "name": "Bash",
                "padding": "0, 0, 0, 0",
                "snapOnInput": true,
                "startingDirectory": "%USERPROFILE%",
                "useAcrylic": false
            }
        ]
    },

    // Add custom color schemes to this array
    "schemes": [],

    // Add any keybinding overrides to this array.
    // To unbind a default keybinding, set the command to "unbound"
    "keybindings": []
}
Originally created by @hobindar on GitHub (Jul 27, 2020). # Environment ```none Windows build number: 10.0.18362.0 Windows Terminal version (if applicable): 1.1.2021.0 Any other software? - Bash provided by Git Bash 2.27.0 (relevant settings.json included at the end of this bug report) - Gradle 6.2.1 (and many other versions, including 6.4.1) ``` # Steps to reproduce - Apply settings.json (at end of this bug report) to Windows Terminal - Restart Windows Terminal - You will be in a Bash terminal by default - Clone https://github.com/hobindar/noclassdef-sample - From the project root, run `./gradlew assembleDebug` - Observe heavily garbled output Note there are some unknown steps for getting Windows Terminal into this state. This used to work just fine, but it stopped working either after a Windows Terminal update, some automatically applied Windows update, or some other unknown action. Uninstalling and then installing does not fix the issue. Downgrading Windows Terminal to the last known good version, 1.0.1811.0, does not fix the issue. All gradle projects are affected. None of the gradle projects have been modified (at all) since their last known good state. # Expected behavior Output should look like this: ![image](https://user-images.githubusercontent.com/4131146/88568666-52c1c300-d007-11ea-80a9-116a11b4c75d.png) # Actual behavior Output is heavily garbled and instead looks like this: ![image](https://user-images.githubusercontent.com/4131146/88566995-daf29900-d004-11ea-99bd-defde8f506c2.png) ---- Note that someone has also filed this bug on gradle's bug tracker: https://github.com/gradle/gradle/issues/13279 ---- settings.json: ```none // To view the default settings, hold "alt" while clicking on the "Settings" button. // For documentation on these settings, see: https://aka.ms/terminal-documentation { "$schema": "https://aka.ms/terminal-profiles-schema", "defaultProfile": "{00000000-0000-0000-ba54-000000000002}", "profiles": { "defaults": { // Put settings here that you want to apply to all profiles }, "list": [ { // Make changes here to the powershell.exe profile "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", "name": "Windows PowerShell", "commandline": "powershell.exe", "hidden": false }, { // Make changes here to the cmd.exe profile "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", "name": "cmd", "commandline": "cmd.exe", "hidden": false }, { "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}", "hidden": false, "name": "Azure Cloud Shell", "source": "Windows.Terminal.Azure" }, { "guid": "{00000000-0000-0000-ba54-000000000002}", "background": "#000000", "closeOnExit": true, "colorScheme": "Campbell", "commandline": "\"%PROGRAMFILES%\\git\\usr\\bin\\bash.exe\" -i -l", "cursorColor": "#FFFFFF", "cursorShape": "bar", "fontFace": "Consolas", "fontSize": 10, "historySize": 9001, "icon": "ms-appx:///ProfileIcons/{0caa0dad-35be-5f56-a8ff-afceeeaa6101}.png", "name": "Bash", "padding": "0, 0, 0, 0", "snapOnInput": true, "startingDirectory": "%USERPROFILE%", "useAcrylic": false } ] }, // Add custom color schemes to this array "schemes": [], // Add any keybinding overrides to this array. // To unbind a default keybinding, set the command to "unbound" "keybindings": [] } ```
claunia added the Resolution-ExternalNeeds-Tag-Fix labels 2026-01-31 02:06:30 +00:00
Author
Owner

@DHowett commented on GitHub (Jul 27, 2020):

So, unfortunately, this is another instance of "client application is not using ENABLE_VIRTUAL_TERMINAL_PROCESSING". The terminal goes to great lengths to make sure that it's always enabled, but Gradle or the Java runtime or msys/cygwin is explicitly disabling it. There's nothing we can do when the application requests that it VT sequence processing be disabled (because it might be doing so for compatibility reasons.)

/dup https://github.com/gradle/gradle/issues/13279

@DHowett commented on GitHub (Jul 27, 2020): So, unfortunately, this is another instance of "client application is not using `ENABLE_VIRTUAL_TERMINAL_PROCESSING`". The terminal goes to _great_ lengths to make sure that it's always enabled, but Gradle or the Java runtime or msys/cygwin is **explicitly** disabling it. There's nothing we can do when the application requests that it VT sequence processing be disabled (because it might be doing so for compatibility reasons.) /dup https://github.com/gradle/gradle/issues/13279
Author
Owner

@ghost commented on GitHub (Jul 27, 2020):

Hi! We've identified this issue as a duplicate of one that exists on somebody else's Issue Tracker. Please make sure you subscribe to the referenced external issue for future updates. Thanks for your report!

@ghost commented on GitHub (Jul 27, 2020): Hi! We've identified this issue as a duplicate of one that exists on somebody else's Issue Tracker. Please make sure you subscribe to the referenced external issue for future updates. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#9879