Permalink
Browse files

Merge pull request #2126 from tomykaira/no_color_for_redirect

Disable ANSI coloring when output is redirected
  • Loading branch information...
2 parents 89b96f7 + 1c5acac commit 3d15318f19540797f2eff51899fda124974792cf @indirect indirect committed Nov 2, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/bundler/cli.rb
View
@@ -9,7 +9,7 @@ class CLI < Thor
def initialize(*)
super
- the_shell = (options["no-color"] ? Thor::Shell::Basic.new : shell)
+ the_shell = (options["no-color"] || (not STDOUT.tty?) ? Thor::Shell::Basic.new : shell)
Bundler.ui = UI::Shell.new(the_shell)
Bundler.ui.debug! if options["verbose"]
Bundler.rubygems.ui = UI::RGProxy.new(Bundler.ui)

0 comments on commit 3d15318

Please sign in to comment.