krlmlr / r-appveyor

Tools for using R with AppVeyor (https://appveyor.com)
132 stars 60 forks source link

CRAN env variable not respected? #155

Closed ramiromagno closed 5 years ago

ramiromagno commented 5 years ago

hi

Disclaimer: I am not entirely sure I am setting up my appveyor.yml file correctly, but I've tried setting the CRAN variable, like this:

environment:
  CRAN: https://cran.rstudio.com/

but https://cloud.r-project.org is still being used instead.

I do have this piece of code at the beginning:

# Download script file from GitHub
init:
  ps: |
        $ErrorActionPreference = "Stop"
        Invoke-WebRequest http://raw.github.com/krlmlr/r-appveyor/master/scripts/appveyor-tool.ps1 -OutFile "..\appveyor-tool.ps1"
        Import-Module '..\appveyor-tool.ps1'

install:
  ps: Bootstrap

and it seems that http://raw.github.com/krlmlr/r-appveyor/master/scripts/appveyor-tool.ps1 has CRAN hardcoded to https://cloud.r-project.org, is that right?

Thanks.

krlmlr commented 5 years ago

Thanks. Can you please point me to the relevant logs? Please link to the relevant line by clicking the line number in the console output before copying the URL.

ramiromagno commented 5 years ago

appveyor.yml: https://github.com/ramiromagno/gwasrapidd/blob/master/appveyor.yml appveyor log: https://ci.appveyor.com/project/ramiromagno/gwasrapidd/builds/25744247?fullLog=true#L19

krlmlr commented 5 years ago

Yes indeed, the download location for R itself is hard-coded, but the packages still should be picked up from the right place. Are there any downsides in respecting the CRAN env var here? Would you like to submit a pull request?

ramiromagno commented 5 years ago

Are there any downsides in respecting the CRAN env var here?

Not really, I think it's fine, except for this one case: last week CRAN's official mirror was down and I tried for the first time changing the env variable to RStudio's mirror and the appveyor builds were still failing because they could not retrieve R itself.

Would you like to submit a pull request?

I would like to help but I have never looked into this package code so I am not sure how much work is involved...

krlmlr commented 5 years ago

Thanks, done. Let's see if it works ;-)