[前][次][番号順一覧][スレッド一覧]

ruby-changes:61390

From: Jeremy <ko1@a...>
Date: Wed, 27 May 2020 07:48:07 +0900 (JST)
Subject: [ruby-changes:61390] e0b40ef5d8 (master): Don't convert bundler man pages from mdoc to man

https://git.ruby-lang.org/ruby.git/commit/?id=e0b40ef5d8

From e0b40ef5d8173aff304c81f93516e1246e3c042c Mon Sep 17 00:00:00 2001
From: Jeremy Evans <code@j...>
Date: Tue, 26 May 2020 14:00:51 -0700
Subject: 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]

diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index c91d4ff..7d7dbd5 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -632,8 +632,13 @@ install?(:local, :comm, :man) do https://github.com/ruby/ruby/blob/trunk/tool/rbinstall.rb#L632
       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|
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]