Skip to content

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

Draft
cstamas wants to merge 1 commit into
maven-3.10.xfrom
maven-3.10.x-issue-14018
Draft

cstamas wants to merge 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

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)

1 participant