Skip to content
This repository was archived by the owner on Jan 15, 2024. It is now read-only.

Commit 948435d

Browse files
committed
Don't include color on Windows by default
1 parent 9dce0ce commit 948435d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/strainer/cli.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
# limitations under the License.
1616
#
1717

18+
require 'buff/platform'
1819
require 'strainer'
1920
require_relative 'strainerfile'
2021

@@ -65,7 +66,7 @@ def initialize(*args)
6566
class_option :strainer_file, :type => :string, :aliases => '-s', :desc => 'The path to the Strainer file to run against', :banner => 'FILE', :default => Strainer::Strainerfile::DEFAULT_FILENAME
6667
class_option :sandbox, :type => :string, :aliases => '-s', :desc => 'The sandbox path (defaults to a temporary directory)', :default => Dir.mktmpdir
6768
class_option :debug, :type => :boolean, :aliases => '-d', :desc => 'Show debugging log output', :default => false
68-
class_option :color, :type => :boolean, :aliases => '-co', :desc => 'Enable color in Strainer output', :default => true
69+
class_option :color, :type => :boolean, :aliases => '-co', :desc => 'Enable color in Strainer output', :default => !Buff::Platform.windows?
6970

7071
# strainer test *COOKBOOKS
7172
method_option :except, :type => :array, :aliases => '-e', :desc => 'Strainerfile labels to ignore'

strainer.gemspec

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ Gem::Specification.new do |gem|
1616
gem.name = 'strainer'
1717
gem.require_paths = ['lib']
1818

19-
gem.add_runtime_dependency 'berkshelf', '~> 2.0'
19+
gem.add_runtime_dependency 'berkshelf', '~> 2.0'
20+
gem.add_runtime_dependency 'buff-platform', '~> 0.1'
2021

2122
gem.add_development_dependency 'redcarpet'
2223
gem.add_development_dependency 'yard'

0 commit comments

Comments
 (0)