Skip to content

Commit

Permalink
Catches exceptions Errno::ENODEV and Errno::EBADF in get_screen_size. C…
Browse files Browse the repository at this point in the history
…loses ruby#690
  • Loading branch information
vtamara committed May 10, 2024
1 parent 1b6c29a commit b5b1fab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/reline/ansi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def self.get_screen_size
s = [ENV["LINES"].to_i, ENV["COLUMNS"].to_i]
return s if s[0] > 0 && s[1] > 0
[24, 80]
rescue Errno::ENOTTY
rescue Errno::ENOTTY, Errno::ENODEV, Errno::EBADF
[24, 80]
end

Expand Down

0 comments on commit b5b1fab

Please sign in to comment.