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

[rubygems/rubygems] Extract a local variable

https://github.com/rubygems/rubygems/commit/445c9da2ac
This commit is contained in:
David Rodríguez 2020-04-27 22:58:35 +02:00 committed by Hiroshi SHIBATA
parent ece1690105
commit a453f26b0d
Notes: git 2020-05-08 14:14:16 +09:00

View file

@ -130,10 +130,11 @@ module Bundler
end]
if man_pages.include?(command)
man_page = man_pages[command]
if Bundler.which("man") && man_path !~ %r{^file:/.+!/META-INF/jruby.home/.+}
Kernel.exec "man #{man_pages[command]}"
Kernel.exec "man #{man_page}"
else
puts File.read("#{man_path}/#{File.basename(man_pages[command])}.txt")
puts File.read("#{man_path}/#{File.basename(man_page)}.txt")
end
elsif command_path = Bundler.which("bundler-#{cli}")
Kernel.exec(command_path, "--help")