Skip to content

Commit

Permalink
Modified rainbow to respect the CLICOLOR_FORCE variable.
Browse files Browse the repository at this point in the history
Rainbow will be enabled if CLICOLOR_FORCE is set to 1, even if it detects that STDOUT is not a TTY.
  • Loading branch information
Mark Smith committed Dec 28, 2011
1 parent 70f8d27 commit 67c8a4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rainbow.rb
Expand Up @@ -4,7 +4,7 @@
module Sickill
module Rainbow
class << self; attr_accessor :enabled; end
@enabled = STDOUT.tty? && ENV['TERM'] != 'dumb'
@enabled = STDOUT.tty? && ENV['TERM'] != 'dumb' || ENV['CLICOLOR_FORCE'] == '1'

TERM_COLORS = {
:black => 0,
Expand Down

0 comments on commit 67c8a4c

Please sign in to comment.