Skip to content

Account for RStudio Cloud in create_*() functions and use_course() #694

@ijlyttle

Description

@ijlyttle

Follow-on from #685:

This is adjacent to #466, but I wonder what should be the default "conspicuous place" on RStudio Cloud. Currently, it seems to be home/rstudio-user, which I think is meant for dotfiles and the like. I wonder if the default conspicuous-place for RStudio Cloud should be /cloud/project.

To me, the "simplest" solution would be to add path_real("/cloud/project") to the top of the vector of paths, here:

usethis/R/course.R

Lines 290 to 297 in 2749025

conspicuous_place <- function() {
Filter(dir_exists, c(
path_home("Desktop"),
path_home(),
path_home_r(),
path_tidy(getwd())
))[[1]]
}

Questions:

  • this would introduce a problem if someone happens to have that path, but not be on RStudio Cloud, but I don't know how to ask is_this_rstudio_cloud(). Thoughts?

  • would path_real() be the right path-creator?

I will start a PR along these lines, subject to your guidance.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions