Feature #13956
Colorize console output on Windows
| Status: | Closed | Start date: | 04/16/2012 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% | ||
| Category: | windows | |||
| Target version: | 2.7.15 | |||
| Affected Puppet version: | 2.7.6 | Branch: | https://github.com/puppetlabs/puppet/pull/776 | |
| Keywords: | ||||
Description
Windows consoles do not support ANSI escape sequences, and so Puppet by default disables colorizing output (on Windows). However, the win32console gem https://github.com/luislavena/win32console translates these escape sequences into the appropriate native console calls.
Ken has submitted fixes upstream to fix how foreground and background colors are preserved, which is an issue for powershell, since it’s default background is not black. Now that Ken’s fix has been merged, we should move forward with colorizing Windows console output by default.
Related issues
History
#1
Updated by Jeff McCune about 1 year ago
Updated ruby.zip¶
I’ve updated the ruby.zip file to include win32console (1.3.1 x86-mingw32).
The windows MSI packages will now install this gem once new packages are built.
#2
Updated by Jeff McCune about 1 year ago
- Assignee changed from Josh Cooper to Jeff McCune
Needs patches to 2.7.x¶
I have the gem installed and built into the package, but we still need to patch 2.7.x to take advantage of the gem.
I’m running Puppet 2.7.14rc2-11-gd0d34a7
Here’s a screenshot of what’s happening:

I’m looking into the patches required to Puppet now.
#3
Updated by Josh Cooper about 1 year ago
- Status changed from Accepted to In Topic Branch Pending Review
- Branch set to https://github.com/puppetlabs/puppet/pull/708
#4
Updated by Jeff McCune about 1 year ago
- Status changed from In Topic Branch Pending Review to Merged - Pending Release
- Assignee deleted (
Jeff McCune) - Target version changed from 2.7.x to 2.7.15
Merged into 2.7.x¶
As: https://github.com/puppetlabs/puppet/commit/64348a0
As 2.7.14 is in RC right now, I set the target version to 2.7.15.
#5
Updated by Josh Cooper about 1 year ago
- Status changed from Merged - Pending Release to Code Insufficient
- Assignee set to Josh Cooper
#6
Updated by Josh Cooper about 1 year ago
- Status changed from Code Insufficient to In Topic Branch Pending Review
- Target version changed from 2.7.15 to 2.7.x
- Branch changed from https://github.com/puppetlabs/puppet/pull/708 to https://github.com/puppetlabs/puppet/pull/776
Commit https://github.com/puppetlabs/puppet/commit/64348a0 caused puppet to get into an recursive loop when the the win32console gem was not installed and running puppet with —debug. Commit #91a4a7d fixed this, but broke the case where the gem is installed (due to rubygems not yet being loaded). A new pull request has been submitted to get colorized output working again in 2.7.x
#7
Updated by Josh Cooper about 1 year ago
- Status changed from In Topic Branch Pending Review to Merged - Pending Release
- Target version changed from 2.7.x to 2.7.15
#8
Updated by Moses Mendoza about 1 year ago
- Status changed from Merged - Pending Release to Closed
released in 2.7.15rc1