diff options
author | Adam Edwards <adamed@opscode.com> | 2015-09-20 23:01:50 -0700 |
---|---|---|
committer | adamedx <adamed@getchef.com> | 2015-10-06 19:30:29 -0700 |
commit | 9fa35d05a5eba1b3f5c774cd28ec6169c9b003db (patch) | |
tree | 1a0445cecf27a19184c8f272522da7e1af18137f | |
parent | 0e0359d546ff9dd85859fad882f1cd71f745b517 (diff) | |
download | chef-9fa35d05a5eba1b3f5c774cd28ec6169c9b003db.tar.gz |
Windows cli tools should have color true by defaultadamedx/windows-color-defaults
-rw-r--r-- | lib/chef/application/apply.rb | 2 | ||||
-rw-r--r-- | lib/chef/application/client.rb | 4 | ||||
-rw-r--r-- | lib/chef/application/knife.rb | 4 | ||||
-rw-r--r-- | spec/unit/application/client_spec.rb | 4 | ||||
-rw-r--r-- | spec/unit/application/knife_spec.rb | 4 |
5 files changed, 9 insertions, 9 deletions
diff --git a/lib/chef/application/apply.rb b/lib/chef/application/apply.rb index 243b441119..c4f34911f4 100644 --- a/lib/chef/application/apply.rb +++ b/lib/chef/application/apply.rb @@ -100,7 +100,7 @@ class Chef::Application::Apply < Chef::Application option :color, :long => '--[no-]color', :boolean => true, - :default => !Chef::Platform.windows?, + :default => true, :description => "Use colored output, defaults to enabled" option :minimal_ohai, diff --git a/lib/chef/application/client.rb b/lib/chef/application/client.rb index 148257ab89..bf724d7522 100644 --- a/lib/chef/application/client.rb +++ b/lib/chef/application/client.rb @@ -58,8 +58,8 @@ class Chef::Application::Client < Chef::Application option :color, :long => '--[no-]color', :boolean => true, - :default => !Chef::Platform.windows?, - :description => "Use colored output, defaults to false on Windows, true otherwise" + :default => true, + :description => "Use colored output, defaults to enabled" option :log_level, :short => "-l LEVEL", diff --git a/lib/chef/application/knife.rb b/lib/chef/application/knife.rb index af5216ae00..d169a5dab5 100644 --- a/lib/chef/application/knife.rb +++ b/lib/chef/application/knife.rb @@ -44,8 +44,8 @@ class Chef::Application::Knife < Chef::Application option :color, :long => '--[no-]color', :boolean => true, - :default => !Chef::Platform.windows?, - :description => "Use colored output, defaults to false on Windows, true otherwise" + :default => true, + :description => "Use colored output, defaults to enabled" option :environment, :short => "-E ENVIRONMENT", diff --git a/spec/unit/application/client_spec.rb b/spec/unit/application/client_spec.rb index 831a3fc19e..727536f1f8 100644 --- a/spec/unit/application/client_spec.rb +++ b/spec/unit/application/client_spec.rb @@ -288,9 +288,9 @@ describe Chef::Application::Client, "configure_chef" do ARGV.replace(@original_argv) end - it "should set the colored output to false by default on windows and true otherwise" do + it "should set the colored output to true by default on windows and true on all other platforms as well" do if windows? - expect(Chef::Config[:color]).to be_falsey + expect(Chef::Config[:color]).to be_truthy else expect(Chef::Config[:color]).to be_truthy end diff --git a/spec/unit/application/knife_spec.rb b/spec/unit/application/knife_spec.rb index 3c215eac7f..8894e86240 100644 --- a/spec/unit/application/knife_spec.rb +++ b/spec/unit/application/knife_spec.rb @@ -70,13 +70,13 @@ describe Chef::Application::Knife do end end - it "should set the colored output to false by default on windows and true otherwise" do + it "should set the colored output to true by default on windows and true on all other platforms as well" do with_argv(*%w{noop knife command}) do expect(@knife).to receive(:exit).with(0) @knife.run end if windows? - expect(Chef::Config[:color]).to be_falsey + expect(Chef::Config[:color]).to be_truthy else expect(Chef::Config[:color]).to be_truthy end |