lib/binman.rb in binman-3.3.1 vs lib/binman.rb in binman-3.3.2

- old
+ new

@@ -52,11 +52,15 @@ # try showing HTML manual page in a web browser in background require 'opener' Dir["#{man_path}/**/#{man_page}.*.html"].each do |man_html| # close streams to avoid interference with man(1) reader below - Opener.spawn man_html, 0 => :close, 1 => :close, 2 => :close + begin + Opener.spawn man_html, 0 => :close, 1 => :close, 2 => :close + rescue Errno::ENOENT + # designated opener program could not be found on this system + end end # try showing roff manual page in man(1) reader in foreground; # close STDERR to avoid interference with the fall back below return if system 'man', '-M', man_path, '-a', man_page, 2 => :close @@ -94,10 +98,10 @@ def require_md2man require 'rubygems' unless respond_to? :gem gem 'md2man', '~> 2.0' if respond_to? :gem require 'md2man/version' rescue LoadError - raise "Run `gem install md2man --version '~> 2.0'` for #{library.inspect}." + raise 'Run `gem install md2man --version "~> 2.0"` to use BinMan::conv().' end private # Returns contents of given source I/O, file name, or string.