From 73f5cad66baefa12e381fafda61355284c1e3258 Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Thu, 9 Feb 2023 17:06:02 +0200 Subject: [PATCH 1/2] Add c() to pass vector of package names install.packages() --- R/write_installer.R | 2 +- tests/testthat/test-write_install.R | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/R/write_installer.R b/R/write_installer.R index 07fe6c0..a348fd7 100644 --- a/R/write_installer.R +++ b/R/write_installer.R @@ -20,7 +20,7 @@ write_install <- function(path = ".") { packages <- get_dependencies(path) res <- paste0(" \"", packages) res <- paste0(res, collapse = "\",\n") - res <- paste0("install.packages(\n", res, "\"\n)") + res <- paste0("install.packages(\n c( \n", res, "\")\n)") fs::dir_create(glue("{path}/.binder")) usethis::write_over(glue("{path}/.binder/install.R"), res) } diff --git a/tests/testthat/test-write_install.R b/tests/testthat/test-write_install.R index 32a1b10..a941508 100644 --- a/tests/testthat/test-write_install.R +++ b/tests/testthat/test-write_install.R @@ -44,12 +44,13 @@ glue::glue_collapse(glue::glue('{1:10}')) # Problem here. Write install is not finding all packages. packages_needed_here <- c( "install.packages(", + " c( ", " \"dplyr\",", " \"ggplot2\",", " \"glue\",", " \"purrr\",", " \"rmarkdown\",", - " \"tidyr\"", + " \"tidyr\")", ")" ) From 59cb786a8f68e24431448f32f580ff43deb3c371 Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Thu, 9 Feb 2023 19:26:53 +0200 Subject: [PATCH 2/2] bump version --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index aa4d29e..ca490a2 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: holepunch Title: Configure Your R Project for 'binderhub' -Version: 0.1.28.9000 +Version: 0.1.29.9000 Authors@R: c(person(given = "Karthik", family = "Ram",