Skip to content

Commit

Permalink
No IOContext for stdout and stderr globals (#2727)
Browse files Browse the repository at this point in the history
  • Loading branch information
fonsp authored Dec 2, 2023
1 parent c840eaa commit b15d420
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/runner/PlutoRunner.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2627,8 +2627,8 @@ function with_io_to_logs(f::Function; enabled::Bool=true, loglevel::Logging.LogL
# Redirect both the `stdout` and `stderr` streams to a single `Pipe` object.
pipe = Pipe()
Base.link_pipe!(pipe; reader_supports_async = true, writer_supports_async = true)
pe_stdout = IOContext(pipe.in, default_stdout_iocontext)
pe_stderr = IOContext(pipe.in, default_stdout_iocontext)
pe_stdout = pipe.in
pe_stderr = pipe.in
redirect_stdout(pe_stdout)
redirect_stderr(pe_stderr)

Expand Down Expand Up @@ -2661,7 +2661,7 @@ function with_io_to_logs(f::Function; enabled::Bool=true, loglevel::Logging.LogL
end

# To make the `display` function work.
redirect_display = TextDisplay(pe_stdout)
redirect_display = TextDisplay(IOContext(pe_stdout, default_stdout_iocontext))
pushdisplay(redirect_display)

# Run the function `f`, capturing all output that it might have generated.
Expand Down

0 comments on commit b15d420

Please sign in to comment.