1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Prepare to release bundler-2.1.0

This commit is contained in:
Hiroshi SHIBATA 2019-12-14 19:49:16 +09:00 committed by SHIBATA Hiroshi
parent e2b192f7d5
commit 38002a8adb
Notes: git 2019-12-15 16:41:38 +09:00
146 changed files with 4685 additions and 459 deletions

View file

@ -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