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