diff --git a/DESCRIPTION b/DESCRIPTION index 6864f79..60acbc5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: ghtravis Type: Package Title: Interfaces with GitHub API and Travis -Version: 0.2.11 +Version: 0.3.1 Author: John Muschelli Maintainer: John Muschelli Description: Interfaces and compares things on 'GitHub' @@ -12,3 +12,4 @@ Encoding: UTF-8 LazyData: true RoxygenNote: 6.0.1 Suggests: covr + diff --git a/R/drop_remotes.R b/R/drop_remotes.R index c9f1450..eefd5ea 100644 --- a/R/drop_remotes.R +++ b/R/drop_remotes.R @@ -21,6 +21,9 @@ drop_remotes = function( res = rres$dcf # nres = names(res) remotes = get_remotes(res) + if (length(remotes) == 0) { + return(path) + } parsed = parse_remotes(remotes) pack_with_remote = sapply(parsed, function(x) { diff --git a/R/install_remote_binaries.R b/R/install_remote_binaries.R index 96b6a78..087065f 100644 --- a/R/install_remote_binaries.R +++ b/R/install_remote_binaries.R @@ -72,23 +72,26 @@ install_remote_binaries = function( } } # if (!drop_all) { - # ip = installed.packages() - # need to check versions! + # ip = installed.packages() + # need to check versions! + if (is.null(remotes)) { + keep_packs = update_these_packages(path = path) # utils::remove.packages(keep_packs) keep = (packs %in% keep_packs) - if (!all(keep)) { + if (any(keep)) { warning( paste0( - "Packages: ", paste(packs[keep_packs], collapse = ","), - "have installed binary, but version not correct!") + "Packages: ", paste(packs[keep], collapse = ","), + " have installed binary, but version not correct!") ) } packs = packs[ !keep ] - # } + # } - if (file.exists(path) & !missing(path)) { - drop_remotes(path = path, drop_remotes = packs) + if (file.exists(path)) { + drop_remotes(path = path, drop_remotes = packs) + } } } return(NULL)