Skip to content

Commit

Permalink
Catches Errno::ENODEV and Errno::EBADF in get_screen_size. Closes #690 (
Browse files Browse the repository at this point in the history
#702)

* Catches exceptions Errno::ENODEV and Errno::EBADF in get_screen_size. Closes #690

* Just catching Errno::ENOTTY and Errno::ENODEV
  • Loading branch information
vtamara authored May 22, 2024
1 parent ecadc4e commit a5b5298
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
[24, 80]
end

Expand Down

0 comments on commit a5b5298

Please sign in to comment.