Closed jsocolar closed 2 years ago
Ah ha, that was then the problem with this https://github.com/MarkEdmondson1234/googleCloudRunner/issues/120
Thanks for the detective work! Yes if you have a patch to fix feel free to add it, a note to self is to use isTRUE()
more.
What goes wrong
If I don't have an .Renviron file,
gar_setup_check_session()
errors withEDIT: I'm seeing this error not because I don't have an .Renviron file but rather because I don't have an active Rstudio project (though I am using R via RStudio).
Why it goes wrong
local_file <- file.path(rstudioapi::getActiveProject(), ".Renviron")
returnscharacter(0)
. Thusfile.exists(local_file)
returnslogical(0)
.Suggested fix
Change
if (file.exists(local_file))
toif (isTRUE(file.exists(local_file)))
For example:Session Info