Skip to content

Commit cef9ebf

Browse files
nobuaycabta
authored andcommitted
Suppress stty error on Apple Terminal
`stty` called in `Reline::ANSI.deprep` command shows the following error message on macOS Apple Terminal, with some settings. ``` $ LANG=C irb irb(main):001:0> stty: 'standard input': unable to perform all requested operations stty: 'standard input': unable to perform all requested operations ```
1 parent 473e314 commit cef9ebf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/reline/ansi.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def self.prep
135135

136136
def self.deprep(otio)
137137
int_handle = Signal.trap('INT', 'IGNORE')
138-
`stty #{otio}`
138+
system("stty #{otio}", err: File::NULL)
139139
Signal.trap('INT', int_handle)
140140
Signal.trap('WINCH', @@old_winch_handler) if @@old_winch_handler
141141
end

0 commit comments

Comments
 (0)