From 177bc558452c3d31d901d4091e01316f0c4f6f44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Cs=C3=A1rdi?= Date: Sat, 16 Mar 2024 15:32:36 +0100 Subject: [PATCH] Update install-github.R --- inst/install-github.R | 7 +++++-- install-github.R | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/inst/install-github.R b/inst/install-github.R index 901a3c64..036584b6 100644 --- a/inst/install-github.R +++ b/inst/install-github.R @@ -587,6 +587,8 @@ function(...) { #' @param type Type of package to `update`. #' @param remote_precedence A logical flag specifying whether remote sources should take precedence over #' CRAN when both were found. + #' @param additional_repositories A logical flag specifying whether `Additional_repositories` should + #' be extracted from the DESCRIPTION and appended to `repos`. #' @param object A `package_deps` object. #' @param ... Additional arguments passed to `install_packages`. #' @inheritParams install_github @@ -677,10 +679,11 @@ function(...) { dev_package_deps <- function(pkgdir = ".", dependencies = NA, repos = getOption("repos"), type = getOption("pkgType"), - remote_precedence = TRUE) { + remote_precedence = TRUE, + additional_repositories = TRUE) { pkg <- load_pkg_description(pkgdir) - repos <- c(repos, parse_additional_repositories(pkg)) + repos <- c(repos, if (additional_repositories) parse_additional_repositories(pkg)) deps <- local_package_deps(pkgdir = pkgdir, dependencies = dependencies) diff --git a/install-github.R b/install-github.R index 901a3c64..036584b6 100644 --- a/install-github.R +++ b/install-github.R @@ -587,6 +587,8 @@ function(...) { #' @param type Type of package to `update`. #' @param remote_precedence A logical flag specifying whether remote sources should take precedence over #' CRAN when both were found. + #' @param additional_repositories A logical flag specifying whether `Additional_repositories` should + #' be extracted from the DESCRIPTION and appended to `repos`. #' @param object A `package_deps` object. #' @param ... Additional arguments passed to `install_packages`. #' @inheritParams install_github @@ -677,10 +679,11 @@ function(...) { dev_package_deps <- function(pkgdir = ".", dependencies = NA, repos = getOption("repos"), type = getOption("pkgType"), - remote_precedence = TRUE) { + remote_precedence = TRUE, + additional_repositories = TRUE) { pkg <- load_pkg_description(pkgdir) - repos <- c(repos, parse_additional_repositories(pkg)) + repos <- c(repos, if (additional_repositories) parse_additional_repositories(pkg)) deps <- local_package_deps(pkgdir = pkgdir, dependencies = dependencies)