Skip to content

Commit

Permalink
Merge pull request #48 from OHDSI/eu40
Browse files Browse the repository at this point in the history
Allow users to override the EunomiaDatasets URL with an optional environment variable
  • Loading branch information
fdefalco authored Jun 6, 2023
2 parents 4bc254e + 37830fc commit 67dca78
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions R/EunomiaData.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,11 @@ downloadEunomiaData <- function(datasetName,
))
invisible()
} else {
# downloads the file from github
baseUrl <- "https://raw.githubusercontent.com/OHDSI/EunomiaDatasets/main/datasets"
# downloads the file from github or user specified location
baseUrl <- Sys.getenv("EUNOMIA_DATASETS_URL")
if (baseUrl == "") {
baseUrl <- "https://raw.githubusercontent.com/OHDSI/EunomiaDatasets/main/datasets"
}
result <- utils::download.file(
url = paste(baseUrl, datasetName, zipName, sep = "/"),
destfile = file.path(
Expand Down

0 comments on commit 67dca78

Please sign in to comment.