You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
docuseal/vendor/bundle/ruby/4.0.0/gems/rainbow-3.1.1/lib/rainbow.rb

14 lines
298 B

# frozen_string_literal: true
require_relative 'rainbow/global'
module Rainbow
def self.new
Wrapper.new(global.enabled)
end
self.enabled = false unless STDOUT.tty? && STDERR.tty?
self.enabled = false if ENV['TERM'] == 'dumb'
self.enabled = true if ENV['CLICOLOR_FORCE'] == '1'
end