Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Imports:
glue (>= 1.3.0),
jsonlite,
lifecycle (>= 1.0.0),
pak,
purrr,
rappdirs,
rlang (>= 1.1.0),
Expand Down
13 changes: 11 additions & 2 deletions R/create.R
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ create_quarto_project <- function(
#' In the fork-and-clone case, `create_from_github()` also does additional
#' remote and branch setup, leaving you in the perfect position to make a pull
#' request with [pr_init()], one of several [functions for working with pull
#' requests][pull-requests].
#' requests][pull-requests]. Finally, it installs the dependencies of the
#' package, so you're set up to immediately start working on it.
#'
#' `create_from_github()` works best when your GitHub credentials are
#' discoverable. See below for more about authentication.
Expand Down Expand Up @@ -237,6 +238,8 @@ create_quarto_project <- function(
#' pre-existing `.Rproj` file. Defaults to `FALSE` otherwise (but note that
#' the cloned repo may already be an RStudio Project, i.e. may already have a
#' `.Rproj` file).
#' @param install_dependencies Install package dependencies? Defaults to `TRUE`,
#' so that you can immediately work with the package.
#' @inheritParams use_github
#'
#' @export
Expand All @@ -255,6 +258,7 @@ create_from_github <- function(
destdir = NULL,
fork = NA,
rstudio = NULL,
install_dependencies = TRUE,
open = rlang::is_interactive(),
protocol = git_protocol(),
host = NULL
Expand Down Expand Up @@ -388,7 +392,12 @@ create_from_github <- function(
)
}

rstudio <- rstudio %||% rstudio_available()
if (install_dependencies) {
ui_bullets(c("v" = "Installing missing dependencies."))
pak::local_install_dev_deps(repo_path, upgrade = FALSE)
}

rstudio <- rstudio %||% (rstudio_available() && !is_positron())
rstudio <- rstudio && !is_rstudio_project()
if (rstudio) {
use_rstudio(reformat = FALSE)
Expand Down
7 changes: 6 additions & 1 deletion man/create_from_github.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading