RConsortium / submissions-pilot4-webR

Development repository for Pilot 4 WebAssembly Shiny App
https://rconsortium.github.io/submissions-pilot4/
12 stars 5 forks source link

Error in `download.file()` in build_offline_repo.R #2

Open parmsam-pfizer opened 4 months ago

parmsam-pfizer commented 4 months ago

Lines 144 and 158 in build_offline_repo.R appear to use fs::path() to help build the download URLs, however on Windows the URLs are changed preventing download.

Here's what they look like:

> path(original_repo_location, "PACKAGES.rds")
https:/repo.r-wasm.org/bin/emscripten/contrib/4.3/PACKAGES.rds
> remote_package_info <- download.file(path(original_repo_location, "PACKAGES.rds"), destfile = path(full_package_path, "PACKAGES.rds"), mode = "wb")
Error in download.file(path(original_repo_location, "PACKAGES.rds"), destfile = path(full_package_path,  : 
  scheme not supported in URL 'https:/repo.r-wasm.org/bin/emscripten/contrib/4.3/PACKAGES.rds'

A simple solution would be to use file.path(original_repo_location, "PACKAGES.rds", fsep = "") for those lines.