Skip to content

Enable ANSI colors on Windows 11 terminals without WT_SESSION - #14039

Merged
cstamas merged 1 commit into
maven-3.10.xfrom
maven-3.10.x-issue-14018
Nov 18, 2026
Merged

cstamas merged 1 commit into
maven-3.10.xfrom
maven-3.10.x-issue-14018

Conversation

@cstamas

@cstamas cstamas commented Nov 17, 2026

Copy link
Copy Markdown
Member

Fixes #14018

Since JLine was removed in 3.10.1, Maven turns colors on for a Windows console only when an environment variable shows the terminal handles ANSI escapes (WT_SESSION, ConEmuANSI, ANSICON, TERM_PROGRAM=vscode or TERM). A shell that Windows hands over to Windows Terminal, for example one launched by GitHub Desktop, does not get WT_SESSION, so colors were off even though the terminal renders them.

Windows 11 uses Windows Terminal as the default terminal, and the legacy console host is opt-in there, so trust an interactive console on Windows 11 too. Other Windows versions keep the environment variable checks, as the legacy console host does not process escapes unless the program enables it. Windows 11 users who made the legacy console their default again can use --color=never.

…14018)

Since JLine was removed in 3.10.1, Maven turns colors on for a Windows
console only when an environment variable shows the terminal handles
ANSI escapes (WT_SESSION, ConEmuANSI, ANSICON, TERM_PROGRAM=vscode or
TERM). A shell that Windows hands over to Windows Terminal, for example
one launched by GitHub Desktop, does not get WT_SESSION, so colors were
off even though the terminal renders them.

Windows 11 uses Windows Terminal as the default terminal, and the
legacy console host is opt-in there, so trust an interactive console
on Windows 11 too. Other Windows versions keep the environment variable
checks, as the legacy console host does not process escapes unless the
program enables it. Windows 11 users who made the legacy console their
default again can use --color=never.
@cstamas
cstamas marked this pull request as ready for review November 18, 2026 16:08
@cstamas
cstamas merged commit 3363ebb into maven-3.10.x Nov 18, 2026
17 checks passed
@cstamas
cstamas deleted the maven-3.10.x-issue-14018 branch November 18, 2026 17:50
@github-actions

Copy link
Copy Markdown
Contributor

@cstamas Please assign appropriate label to PR according to the type of change.

@cstamas cstamas added the bug Something isn't working label Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ANSI color detection fails in PowerShell terminal launched through GitHub Desktop on Windows (Maven 3.10.1)

2 participants