Skip to content

Conversation

alexhall
Copy link

@alexhall alexhall commented Sep 13, 2024

This change makes the capture/bypass macro aware of the capture context in which it's running, so that it can more intelligently restore previous out/err writers (or just pass through if no capturing is active).

Unsupported corner cases:

  • Nested capturing (will write to the next level up, not the original out/err)
  • Code running on other threads where bindings weren't conveyed (will still write to the redef'ed out/err)

If this approach looks sensible, I'm happy to clean up the code, add tests, etc.

Fixes #446

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bypassing capture-output has unexpected behavior when running in REPL
1 participant