From 78c602f5f0873b174761bf6d12e0167487a6ddaf Mon Sep 17 00:00:00 2001 From: Craig Williams Date: Thu, 28 Sep 2023 10:46:47 +0100 Subject: [PATCH] Fixed custom remote install --- DESCRIPTION | 2 +- R/install_package_source.R | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 8126cb2..b85d549 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: Rpacman Type: Package Title: Very simple package manager for R -Version: 1.0.3 +Version: 1.0.4 Date: 2022-05-31 Authors@R: person("Craig", "Williams", email = "craig@avsdev.uk", role = c("aut", "cre")) URL: https://avsdev.uk/R/Rpacman diff --git a/R/install_package_source.R b/R/install_package_source.R index 2d9f075..288a22d 100644 --- a/R/install_package_source.R +++ b/R/install_package_source.R @@ -10,12 +10,12 @@ #' @export install_package_source <- function(packageSource, installOpts = list(Ncpus = parallel::detectCores())) { packageRemote <- switch( - packageSource$type, + unlist(packageSource$type), git_url = remotes:::git_remote(packageSource$src, ref = packageSource$ref), github = remotes:::github_remote(packageSource$src, ref = packageSource$ref), gitlab = remotes:::gitlab_remote(packageSource$src), svn = remotes:::svn_remote(packageSource$src, revision = packageSource$ref), - bitbucket = remotes:::bitbucket_remote(packageSource$src, ref = packageSource$ef), + bitbucket = remotes:::bitbucket_remote(packageSource$src, ref = packageSource$ref), Bioconductor = remotes:::bio_remote(packageSource$src) ) @@ -23,7 +23,7 @@ install_package_source <- function(packageSource, installOpts = list(Ncpus = par force = FALSE, quiet = FALSE, build = TRUE, build_opts = c("--no-resave-data", "--no-manual", "--no-build-vignettes"), build_manual = FALSE, build_vignettes = FALSE, - repos = getOption("repos"), type = getOption("pkgType"), installOpts) + repos = getOption("repos"), type = getOption("pkgType")) allPackages <- utils::installed.packages() allPackages <- as.data.frame(allPackages)