diff options
-rw-r--r-- | lib/puppet/defaults.rb | 2 | ||||
-rwxr-xr-x | spec/integration/defaults_spec.rb | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb index 07442d0e9..488b991d7 100644 --- a/lib/puppet/defaults.rb +++ b/lib/puppet/defaults.rb @@ -47,7 +47,7 @@ module Puppet exits. Comma-separate multiple values. For a list of all values, specify 'all'. This feature is only available in Puppet versions higher than 0.18.4."], - :color => ["ansi", "Whether to use colors when logging to the console. + :color => [(Puppet.features.microsoft_windows? ? "false" : "ansi"), "Whether to use colors when logging to the console. Valid values are `ansi` (equivalent to `true`), `html` (mostly used during testing with TextMate), and `false`, which produces no color."], diff --git a/spec/integration/defaults_spec.rb b/spec/integration/defaults_spec.rb index 9bec769ab..a165838c3 100755 --- a/spec/integration/defaults_spec.rb +++ b/spec/integration/defaults_spec.rb @@ -277,4 +277,14 @@ describe "Puppet defaults" do subject { Puppet.settings[:reporturl] } it { should == "http://localhost:3000/reports" } end + + describe "when configuring color" do + it "should default to ansi", :unless => Puppet.features.microsoft_windows? do + Puppet.settings[:color].should == 'ansi' + end + + it "should default to false", :if => Puppet.features.microsoft_windows? do + Puppet.settings[:color].should == 'false' + end + end end |