use_course() relies on the presence of an .Rproj file to trigger opening the project via rstudioapi::openProject():
|
if (is_interactive()) { |
|
rproj_path <- rproj_paths(target) |
|
if (length(rproj_path) == 1 && rstudioapi::hasFun("openProject")) { |
|
ui_bullets(c("v" = "Opening project in RStudio.")) |
|
rstudioapi::openProject(target, newSession = TRUE) |
|
} else if (!in_rstudio_server()) { |
|
ui_bullets(c( |
|
"v" = "Opening {.path {pth(target, base_path)}} in the file manager." |
|
)) |
|
utils::browseURL(path_real(target)) |
|
} |
|
} |
For a project designed to be used in Positron, this file may not be present, but it would be nice if the project still opened in a new Positron window.
use_course()relies on the presence of an.Rprojfile to trigger opening the project viarstudioapi::openProject():usethis/R/course.R
Lines 398 to 409 in 4aa55e7
For a project designed to be used in Positron, this file may not be present, but it would be nice if the project still opened in a new Positron window.