Skip to content

Commit

Permalink
running install2 as shell so CRAN is not an issue
Browse files Browse the repository at this point in the history
  • Loading branch information
muschellij2 committed Oct 14, 2021
1 parent 235f09f commit 9c71bef
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions R/package-installation-methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ add_install_instructions <- function(base_dockerfile,

if (versioned_packages) {
futile.logger::flog.info("Versioned packages enabled, installing 'versions'")
addInstruction(base_dockerfile) <- Run("install2.r", "versions")
addInstruction(base_dockerfile) <- Run_shell("install2.r", "versions")
}

# 2. add installation instruction for CRAN packages
Expand All @@ -101,7 +101,7 @@ add_install_instructions <- function(base_dockerfile,
} else {
cran_packages <- stringr::str_sort(as.character(unlist(pkgs_cran$name))) # sort, to increase own reproducibility
futile.logger::flog.info("Adding CRAN packages: %s", toString(cran_packages))
addInstruction(base_dockerfile) <- Run("install2.r", cran_packages)
addInstruction(base_dockerfile) <- Run_shell("install2.r", cran_packages)
}
} else futile.logger::flog.debug("No CRAN packages to add.")

Expand All @@ -115,7 +115,7 @@ add_install_instructions <- function(base_dockerfile,
bioc_packages <- stringr::str_sort(as.character(unlist(pkgs_bioc$name))) # sort, to increase own reproducibility
futile.logger::flog.info("Adding Bioconductor packages: %s", toString(bioc_packages))
repos = as.character(BiocManager::repositories())
addInstruction(base_dockerfile) <- Run("install2.r", params = c(sprintf("-r %s -r %s -r %s -r %s",
addInstruction(base_dockerfile) <- Run_shell("install2.r", params = c(sprintf("-r %s -r %s -r %s -r %s",
repos[1], repos[2],
repos[3], repos[4]),
bioc_packages))
Expand Down Expand Up @@ -161,7 +161,7 @@ versioned_install_instructions <- function(pkgs) {
unversioned <- pkgs_sorted[is.na(pkgs_sorted$version),]
unversioned <- stringr::str_sort(as.character(unlist(unversioned$name))) # sort, to increase own reproducibility
futile.logger::flog.warn("No version information found for packages: %s", toString(unversioned))
instructions <- c(Run("install2.r", unversioned), instructions)
instructions <- c(Run_shell("install2.r", unversioned), instructions)
}
return(instructions)
}
Expand Down

0 comments on commit 9c71bef

Please sign in to comment.