Skip to content

Commit

Permalink
Merge pull request rubygems#2126 from tomykaira/no_color_for_redirect
Browse files Browse the repository at this point in the history
Disable ANSI coloring when output is redirected
  • Loading branch information
indirect committed Nov 2, 2012
2 parents 89b96f7 + 1c5acac commit 3d15318
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/bundler/cli.rb
Expand Up @@ -9,7 +9,7 @@ class CLI < Thor


def initialize(*) def initialize(*)
super 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 = UI::Shell.new(the_shell)
Bundler.ui.debug! if options["verbose"] Bundler.ui.debug! if options["verbose"]
Bundler.rubygems.ui = UI::RGProxy.new(Bundler.ui) Bundler.rubygems.ui = UI::RGProxy.new(Bundler.ui)
Expand Down

0 comments on commit 3d15318

Please sign in to comment.