summaryrefslogtreecommitdiff
path: root/lib/bundler/setup.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/setup.rb')
-rw-r--r--lib/bundler/setup.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/bundler/setup.rb b/lib/bundler/setup.rb
index d156f494a8..b9a2f8f1da 100644
--- a/lib/bundler/setup.rb
+++ b/lib/bundler/setup.rb
@@ -6,9 +6,8 @@ if Bundler::SharedHelpers.in_bundle?
require_relative "../bundler"
if STDOUT.tty? || ENV["BUNDLER_FORCE_TTY"]
- Bundler.ui = Bundler::UI::Shell.new
begin
- Bundler.setup
+ Bundler.ui.silence { Bundler.setup }
rescue Bundler::BundlerError => e
Bundler.ui.warn "\e[31m#{e.message}\e[0m"
Bundler.ui.warn e.backtrace.join("\n") if ENV["DEBUG"]
@@ -18,12 +17,10 @@ if Bundler::SharedHelpers.in_bundle?
exit e.status_code
end
else
- Bundler.setup
+ Bundler.ui.silence { Bundler.setup }
end
# Add bundler to the load path after disabling system gems
bundler_lib = File.expand_path("../..", __FILE__)
$LOAD_PATH.unshift(bundler_lib) unless $LOAD_PATH.include?(bundler_lib)
-
- Bundler.ui = nil
end