mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/reline] Make a log file on windows if debug env is set
https://github.com/ruby/reline/commit/dff30a2d44
This commit is contained in:
parent
2b8fa78176
commit
0158ba7e51
1 changed files with 5 additions and 1 deletions
|
@ -200,7 +200,11 @@ module Reline
|
|||
|
||||
private def inner_readline(prompt, add_hist, multiline, &confirm_multiline_termination)
|
||||
if ENV['RELINE_STDERR_TTY']
|
||||
$stderr.reopen(ENV['RELINE_STDERR_TTY'], 'w')
|
||||
if Reline::IOGate.win?
|
||||
$stderr = File.open(ENV['RELINE_STDERR_TTY'], 'a')
|
||||
else
|
||||
$stderr.reopen(ENV['RELINE_STDERR_TTY'], 'w')
|
||||
end
|
||||
$stderr.sync = true
|
||||
$stderr.puts "Reline is used by #{Process.pid}"
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue