summaryrefslogtreecommitdiff
path: root/lib/rdoc/ri/driver.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rdoc/ri/driver.rb')
-rw-r--r--lib/rdoc/ri/driver.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/rdoc/ri/driver.rb b/lib/rdoc/ri/driver.rb
index 9083f6c67a..b5523355d5 100644
--- a/lib/rdoc/ri/driver.rb
+++ b/lib/rdoc/ri/driver.rb
@@ -1034,7 +1034,11 @@ Options may also be set in the 'RI' environment variable.
pagers = [ENV['RI_PAGER'], ENV['PAGER'], 'pager', 'less', 'more']
pagers.compact.uniq.each do |pager|
- io = IO.popen(pager, "w") rescue next
+ next unless File.exist? pager
+
+ io = IO.popen pager, "w" rescue next
+
+ next if $? and $?.exited? # pager didn't work
@paging = true