From f55746a93d48a3ee1fdfacba3716457fabea150a Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Tue, 5 Dec 2023 16:32:09 +0000 Subject: [PATCH] [ruby/irb] Disable pager when TERM is not set too (https://github.com/ruby/irb/pull/802) https://github.com/ruby/irb/commit/173980974b --- lib/irb/pager.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/irb/pager.rb b/lib/irb/pager.rb index d503487865..3391b32c66 100644 --- a/lib/irb/pager.rb +++ b/lib/irb/pager.rb @@ -41,7 +41,7 @@ module IRB private def should_page? - IRB.conf[:USE_PAGER] && STDIN.tty? && ENV["TERM"] != "dumb" + IRB.conf[:USE_PAGER] && STDIN.tty? && (ENV.key?("TERM") && ENV["TERM"] != "dumb") end def content_exceeds_screen_height?(content)