Something funky going on with the JSON unlist
This commit is contained in:
@@ -9,14 +9,18 @@
|
||||
#' @import parallel remotes
|
||||
#' @export
|
||||
install_package_source <- function(packageSource, installOpts = list(Ncpus = parallel::detectCores())) {
|
||||
type <- unlist(packageSource$type)
|
||||
src <- unlist(packageSource$src)
|
||||
ref <- unlist(packageSource$ref)
|
||||
package <- unlist(packageSource$package)
|
||||
packageRemote <- switch(
|
||||
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$ref),
|
||||
Bioconductor = remotes:::bio_remote(packageSource$src)
|
||||
unlist(type),
|
||||
git_url = remotes:::git_remote(src, ref = ref),
|
||||
github = remotes:::github_remote(src, ref = ref),
|
||||
gitlab = remotes:::gitlab_remote(src),
|
||||
svn = remotes:::svn_remote(src, revision = ref),
|
||||
bitbucket = remotes:::bitbucket_remote(src, ref = ref),
|
||||
Bioconductor = remotes:::bio_remote(src)
|
||||
)
|
||||
|
||||
remotes:::install_remote(packageRemote, dependencies = NA, upgrade = "default",
|
||||
@@ -27,7 +31,7 @@ install_package_source <- function(packageSource, installOpts = list(Ncpus = par
|
||||
|
||||
allPackages <- utils::installed.packages()
|
||||
allPackages <- as.data.frame(allPackages)
|
||||
allPackages <- allPackages[allPackages$Package %in% packageSource$package,]
|
||||
allPackages <- allPackages[allPackages$Package %in% package,]
|
||||
package <- data.frame(
|
||||
package = allPackages$Package,
|
||||
version = allPackages$Version
|
||||
|
||||
Reference in New Issue
Block a user