HomePhorge

(Maint) Color console output when the win32console gem is installed
ead9d254da57Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(Maint) Color console output when the win32console gem is installed

Originally, we were using a feature to detect whether the platform
supports ANSI color escape sequences. The feature used to invoke
Puppet.features.rubygems?, which had the side-effect of loading
rubygems, if it hadn't already been loaded.

However, the ansicolor feature could cause infinite recursive loops when
trying to log that it failed to load the ansicolor feature. So the code
for loading the win32console gem was moved into Puppet::Util::Colors in
commit 91a4a7d.

However, in doing so, rubygems was not being loaded when attempting to
require 'win32console', causing Windows to always raise a LoadError,
even when the win32console gem was installed.

This commit adds an explicit call to require rubygems and now correctly
colors console output when the win32console gem is installed.

Details

Provenance
Josh Cooper <josh@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUab8cd8be002e: Merge pull request #756 from kelseyhightower/ticket/2.7.
Branches
Unknown
Tags
Unknown

Event Timeline

Josh Cooper <josh@puppetlabs.com> committed rPUead9d254da57: (Maint) Color console output when the win32console gem is installed (authored by Josh Cooper <josh@puppetlabs.com>).May 14 2012, 10:26 PM