diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb index 39701b63307..78340eaed6f 100644 --- a/lib/bundler/cli.rb +++ b/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)