You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Favour new RStudio env vars over existing heuristics #465
I think this should fix the problem with the "Run Tests" button in RStudio; currently when it's run cli::is_dynamic_tty() is FALSE so we get a sub-optimal display.
If I install r-lib/rlang#1404 and devtools::document(), I don't see colour working in the build pane either, so I think the current heuristics fail for more than just "Test file".
@hadley The "Run tests" button wasn't detected with the old methods, I fixed that as well in #471. I probably only looked at the commands in the Build menu....
Activity
hadley commentedon May 23, 2022
I think this should fix the problem with the "Run Tests" button in RStudio; currently when it's run
cli::is_dynamic_tty()isFALSEso we get a sub-optimal display.gaborcsardi commentedon May 23, 2022
Maybe. OTOH the current detection should also detect the build pane correctly, I believe, so maybe this is not the reason?
romainfrancois commentedon May 24, 2022
related to rstudio/rstudio#11281
DavisVaughan commentedon May 24, 2022
A few concrete differences between
Run Testson a single file and CMD+SHIFT+T that hopefully can be resolved:Run Testsdoesn't have colorRun Testslinks to files, liketest-vec-case-when.R, but doesn't linksnapshot_accept()I'm on RStudio 2022.06.0-daily+385
hadley commentedon May 24, 2022
If I install r-lib/rlang#1404 and
devtools::document(), I don't see colour working in the build pane either, so I think the current heuristics fail for more than just "Test file".romainfrancois commentedon May 24, 2022
For the links, I think it's related to the
cli.num_colorsoption used in:cli/R/ansi-hyperlink.R
Line 60 in 23ab07e
FALSEromainfrancois commentedon May 24, 2022
Maybe ? related to
local_reproducible_output(.env = )https://github.com/r-lib/testthat/blob/0f24eae7bd2cd7d0fbe5a5492636731d66d0dd26/R/local.R#L106
Better RStudio detection
gaborcsardi commentedon May 27, 2022
@hadley The "Run tests" button wasn't detected with the old methods, I fixed that as well in #471. I probably only looked at the commands in the Build menu....
@DavisVaughan What does CMD+SHIFT+T run?
DavisVaughan commentedon May 27, 2022
@gaborcsardi It runs
devtools::test()in the Build pane (which I am fairly certain is in a new R session)