-
Notifications
You must be signed in to change notification settings - Fork 92
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
options(cli.hyperlink = TRUE)
is propagating to subprocesses
#3053
Comments
Ooooh I just learned that the I have opened r-lib/roxygen2#1620 and will probably do a PR and will report back |
r-lib/roxygen2#1621 is merged so this works now and allows us to delay needing But we should probably document that you need dev roxygen2 now for the best experience |
In Positron 2024.05.0 (Universal) build 1176, this is now fixed when I use the development version of roxygen2: I added roxygen2 here: https://github.com/posit-dev/positron-beta/wiki#r-prerequisites I'll follow up with a PR to the internal wiki repo. |
This is now updated here as well: https://connect.posit.it/positron-wiki/getting-started.html#r-prerequisites |
tidymodels/recipes
devtools::document()
You should see:
Note that if you print out the code in
selections.Rmd
, you eventually hit this expected errorThe problem is that hyperlink. Due to the fact that we set
cli.hyperlink = TRUE
, subprocesses like the onedocument()
runs in also sets it toTRUE
, even though it is not supported there, and cli tries to generate hyperlink related ansi characters that xml2 doesn't support.positron/extensions/positron-r/resources/scripts/startup.R
Lines 5 to 19 in 5024068
Now, we actually are handling the color correctly here. i.e. we set
cli.default_num_colors
rather thancli.num_colors
, and the "default" there means that it won't apply in the subprocess. This was set and fixed in #1106, where we had this exact issue, but with cli colors rather than hyperlinks.To do this correctly, we need cli to give us the following options:
cli.default_hyperlink
cli.default_hyperlink_run
cli.default_hyperlink_help
cli.default_hyperlink_vignette
cli.default_dynamic
That would allow Positron to set all of these, and then subprocesses will not inherit them.
The text was updated successfully, but these errors were encountered: