diff options
author | Jeremy Evans <code@jeremyevans.net> | 2020-05-26 14:00:51 -0700 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-05-27 07:47:50 +0900 |
commit | e0b40ef5d8173aff304c81f93516e1246e3c042c (patch) | |
tree | dba54aaba26b248ddf5e1470ef3089896f7b994e /tool | |
parent | 962c302a1ae8e50738c36adb61c8ec9c9fa5a49b (diff) | |
download | ruby-e0b40ef5d8173aff304c81f93516e1246e3c042c.tar.gz |
Don't convert bundler man pages from mdoc to man
These man pages are already in man format and assuming they are
mdoc format breaks things.
Fixes [Bug #16823]
Diffstat (limited to 'tool')
-rwxr-xr-x | tool/rbinstall.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index c91d4fff86..7d7dbd55f3 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb @@ -632,8 +632,13 @@ install?(:local, :comm, :man) do class << (w = []) alias print push end - open(mdoc) {|r| Mdoc2Man.mdoc2man(r, w)} - w = w.join("") + if File.basename(mdoc).start_with?('bundle') || + File.basename(mdoc).start_with?('gemfile') + w = File.read(mdoc) + else + open(mdoc) {|r| Mdoc2Man.mdoc2man(r, w)} + w = w.join("") + end if compress require 'tmpdir' Dir.mktmpdir("man") {|d| |