aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bundler/cli/exec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/cli/exec.rb')
-rw-r--r--lib/bundler/cli/exec.rb15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/bundler/cli/exec.rb b/lib/bundler/cli/exec.rb
index 0a1edbdbbd..2bace6e77d 100644
--- a/lib/bundler/cli/exec.rb
+++ b/lib/bundler/cli/exec.rb
@@ -25,12 +25,12 @@ module Bundler
SharedHelpers.set_bundle_environment
if bin_path = Bundler.which(cmd)
if !Bundler.settings[:disable_exec_load] && ruby_shebang?(bin_path)
- return kernel_load(bin_path, *args)
+ return with_verbose_rubygems { kernel_load(bin_path, *args) }
end
- kernel_exec(bin_path, *args)
+ with_verbose_rubygems { kernel_exec(bin_path, *args) }
else
# exec using the given command
- kernel_exec(cmd, *args)
+ with_verbose_rubygems { kernel_exec(cmd, *args) }
end
end
@@ -89,5 +89,14 @@ module Bundler
first_line = File.open(file, "rb") {|f| f.read(possibilities.map(&:size).max) }
possibilities.any? {|shebang| first_line.start_with?(shebang) }
end
+
+ def with_verbose_rubygems
+ old_ui = Gem::DefaultUserInteraction.ui
+ Gem::DefaultUserInteraction.ui = nil
+
+ yield
+ ensure
+ Gem::DefaultUserInteraction.ui = old_ui
+ end
end
end