posit-dev / positron

Positron, a next-generation data science IDE
https://positron.posit.co
Other
2.82k stars 90 forks source link

Consider doing extra work to choose the right `download.file.method` #5390

Open juliasilge opened 6 days ago

juliasilge commented 6 days ago

RStudio does a fair bit of work to determine the best download method; you can see the result in RStudio by calling .rs.secureDownloadMethod(). This option effects a lot including install.packages(), and the fussiness appears to be needed in controlled corporate Windows environments. See https://github.com/posit-dev/positron/discussions/5355 where a user can install packages in RStudio (what RStudio is doing is working) but cannot install packages in Positron. That user got unstuck by setting:

options(download.file.method = "wininet")

The extended discussion in https://github.com/rstudio/rstudio/issues/10163 seems pretty relevant and I will highlight @kevinushey's advice there, for folks looking for a workaround for now:

In any event, I think our current recommendation is to use the default "libcurl" download method if possible (with http_proxy set if a proxy is required), and "wininet" if not (e.g. because you require the default Windows proxy settings).