Reopen Readline.output if it is not a tty
This commit is contained in:
parent
60fe27f17f
commit
1538bc0990
|
@ -618,6 +618,9 @@ class Pry
|
|||
end
|
||||
|
||||
if input == Readline
|
||||
if !$stdout.tty? && $stdin.tty? && !Pry::Helpers::BaseHelpers.windows?
|
||||
Readline.output = File.open('/dev/tty', 'w')
|
||||
end
|
||||
input.readline(current_prompt, false) # false since we'll add it manually
|
||||
elsif defined? Coolline and input.is_a? Coolline
|
||||
input.readline(current_prompt)
|
||||
|
|
Loading…
Reference in New Issue