[ruby/irb] Disable pager when TERM is not set too

(https://github.com/ruby/irb/pull/802)

https://github.com/ruby/irb/commit/173980974b
This commit is contained in:
Stan Lo 2023-12-05 16:32:09 +00:00 committed by git
parent ef387e6730
commit f55746a93d

View File

@ -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)