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
code_theme_default() uses is_rstudio() (by way of rstudio_detect) to determine whether to theme the output for RStudio. This correctly discovers that one is in RStudio, but then assumes that one must have rstudioapi available to load.
This is often not the case. Especially when a project uses renv - only packages relevant to the project will be included in the local library. This results in an error when trying to display .Last.error
# Error: # ! error in pak subprocess# Caused by error in `verify_extracted_package(filename, pkg_cache)`:# ! /tmp/RtmpLAlqvr/file158119387aa7/src/contrib/x86_64-pc-linux-gnu-ubuntu-20.04/4.2/fastglm_0.0.3.tar.gz is not a valid binary, it is missing fastglm/Meta/package.rds.# Type .Last.error to see the more details.>.Last.error# Error in loadNamespace(x) : there is no package called ‘rstudioapi’
Perhaps this condition should also check whether requireNamespace("rstudioapi", quietly = TRUE)
code_theme_default()
usesis_rstudio()
(by way ofrstudio_detect
) to determine whether to theme the output for RStudio. This correctly discovers that one is in RStudio, but then assumes that one must haverstudioapi
available to load.This is often not the case. Especially when a project uses
renv
- only packages relevant to the project will be included in the local library. This results in an error when trying to display.Last.error
Perhaps this condition should also check whether
requireNamespace("rstudioapi", quietly = TRUE)
cli/R/prettycode.R
Lines 239 to 244 in 71fd2a5
The text was updated successfully, but these errors were encountered: