Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #2126 from tomykaira/no_color_for_redirect

Disable ANSI coloring when output is redirected
  • Loading branch information...
commit 3d15318f19540797f2eff51899fda124974792cf 2 parents 89b96f7 + 1c5acac
@indirect indirect authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/bundler/cli.rb
View
2  lib/bundler/cli.rb
@@ -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)
Please sign in to comment.
Something went wrong with that request. Please try again.