Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ SystemRequirements: git, svn
License: Artistic-2.0
URL: https://github.com/gmbecker/switchr
BugReports: https://github.com/gmbecker/switchr/issues
Encoding: UTF-8
RoxygenNote: 7.2.3
4 changes: 4 additions & 0 deletions R/Utilities.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

.cran_path <- function() {
getOption("switchr_cran_mirror", "http://cran.r-project.org")
}

## defaults to src

.getExt = function(repourl = "./src/contrib", regex = FALSE) {
Expand Down
1 change: 0 additions & 1 deletion R/accessors.R
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ setMethod("dep_repos<-", "SessionManifest", function(x, value) {


##' @title Get or set the manifest associated with an object
##'
##'
##' @description Get or set manifest associated with an object
##'
Expand Down
2 changes: 1 addition & 1 deletion R/crandbtmp.R
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ buildTarURLs = function(pkgvers, avail) {
iscurrent[stillthere[currentpkgs]] = TRUE

baseurl = ifelse(iscurrent, "http://cran.rstudio.com/src/contrib",
paste("http://cran.r-project.org/src/contrib/Archive", names(pkgvers), sep="/")
paste(.cran_path(), "src/contrib/Archive", names(pkgvers), sep="/")
)
tarnames = paste0(names(pkgvers), "_", pkgvers, ".tar.gz")
cranurls = paste(baseurl, tarnames, sep = "/")
Expand Down
2 changes: 1 addition & 1 deletion R/manifestFromLib.R
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ setMethod("libManifest", "SwitchrCtx",
##' known_manifest and official repositories.
##' @param ... Currently unused.
##' @examples
##' man = makeSeedMan()
##' \dontrun{man = makeSeedMan()}
##' @export
##' @docType methods
##' @rdname makeSeedMan
Expand Down
2 changes: 1 addition & 1 deletion R/retrievePkgVersion.R
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ findPkgVersionInCRAN = function(name, version, param = SwitchrParam(), dir)

tarname = paste0(name, "_", version, ".tar.gz")

cranurl = paste("http://cran.r-project.org/src/contrib/Archive", name, tarname, sep = "/")
cranurl = paste(.cran_path(), "src/contrib/Archive", name, tarname, sep = "/")


if(!file.exists(destpath))
Expand Down
2 changes: 1 addition & 1 deletion inst/examples/crandb.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ iscurrent = rep(FALSE, times=length(vers))
iscurrent[stillthere[currentpkgs]] = TRUE

baseurl = ifelse(iscurrent, "http://cran.rstudio.com/src/contrib",
paste("http://cran.r-project.org/src/contrib/Archive", names(vers), sep="/")
paste(.cran_path(), "src/contrib/Archive", names(vers), sep="/")
)
cranurls = paste(baseurl, tarnames, sep = "/")

Expand Down
2 changes: 1 addition & 1 deletion man/makeSeedMan.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.