Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

capture.output() does not work in non-interactive mode #153

Closed
gaborcsardi opened this issue May 20, 2020 · 1 comment
Closed

capture.output() does not work in non-interactive mode #153

gaborcsardi opened this issue May 20, 2020 · 1 comment
Labels
bug an unexpected problem or unintended behavior

Comments

@gaborcsardi
Copy link
Member

gaborcsardi commented May 20, 2020

We need to use stdout when there is an active sink, I suppose? I am not entirely sure. Reprex:

R -q -e 'capture.output(cli::cli_text("time: {100} year{?s}"))'
> capture.output(cli::cli_text("time: {100} year{?s}"))
time: 100 years
character(0)
@gaborcsardi gaborcsardi added the bug an unexpected problem or unintended behavior label May 20, 2020
@gaborcsardi
Copy link
Member Author

Or rather, the other way. Messages go to stderr by default and we only want to deter them to stdout, if this does not cause any detectable difference.

So that means that if there is a sink for stdout or stderr, then we output to stderr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

1 participant