Repository navigation
Continue processing even if terminfo database couldn't be found - #673
Merged
Merged
Conversation
ima1zumi
marked this pull request as draft
April 5, 2024 16:52
ima1zumi
force-pushed
the
not-raise-terminfoerror
branch
4 times, most recently
from
April 5, 2024 17:24
462d82c to
31479e2
Compare
Reline::Terminfo.enabled == false
ima1zumi
force-pushed
the
not-raise-terminfoerror
branch
from
April 5, 2024 17:28
31479e2 to
a9e9f86
Compare
ima1zumi
marked this pull request as ready for review
April 5, 2024 17:34
tompng
reviewed
Apr 6, 2024
| true | ||
| end | ||
|
|
||
| def self.supported? |
Member
There was a problem hiding this comment.
I think the name supported? is not clear what is supported.
Terminfo.enabled?: terminfo is enabled
Terminfo.supported?: TERM specified by ENV is supported in terminfo
How about term_supported?
Member
Author
There was a problem hiding this comment.
Sounds good. I updated the code as suggested.
Fix ruby#447 ruby#543 This problem occurs when Fiddle can be loaded, curses can be loaded, and TERM is not registered in Terminfo. It should also occur at hardcopy terminals and when Terminfo information is low, but no such reports have been received. Reline should not abort the process because of missing Terminfo. Reline proceeds with `Reline::Terminfo.enabled? == false` when fiddle or curses cannot be loaded. And does the same when Terminfo is present but TERM is not. https://github.com/ruby/reline/blob/ebab2875f1226f877376558d8758bc0e2a1776c7/lib/reline/terminfo.rb#L156-L160 You can check the operation with `TERM=foo bundle exec bin/console`.
ima1zumi
force-pushed
the
not-raise-terminfoerror
branch
from
April 6, 2024 08:29
a9e9f86 to
e130c10
Compare
tompng
approved these changes
Apr 6, 2024
matzbot
pushed a commit
to ruby/ruby
that referenced
this pull request
Apr 6, 2024
be found (ruby/reline#673) Fix ruby/reline#447 ruby/reline#543 This problem occurs when Fiddle can be loaded, curses can be loaded, and TERM is not registered in Terminfo. It should also occur at hardcopy terminals and when Terminfo information is low, but no such reports have been received. Reline should not abort the process because of missing Terminfo. Reline proceeds with `Reline::Terminfo.enabled? == false` when fiddle or curses cannot be loaded. And does the same when Terminfo is present but TERM is not. https://github.com/ruby/reline/blob/ebab2875f1226f877376558d8758bc0e2a1776c7/lib/reline/terminfo.rb#L156-L160 You can check the operation with `TERM=foo bundle exec bin/console`. ruby/reline@4ce247ce2b
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #447 #543
This problem occurs when Fiddle can be loaded, curses can be loaded, and TERM is not registered in Terminfo.
It should also occur at hardcopy terminals and when Terminfo information is low, but no such reports have been received.
Reline should not abort the process because of missing Terminfo.
Reline proceeds with
Reline::Terminfo.enabled? == falsewhen fiddle or curses cannot be loaded.And does the same when Terminfo is present but TERM is not.
reline/lib/reline/terminfo.rb
Lines 156 to 160 in ebab287
You can check the operation with
TERM=foo bundle exec bin/console.ref:
man 3x curs_terminfo