-
Notifications
You must be signed in to change notification settings - Fork 756
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
check() does not set NOT_CRAN by default #2135
Comments
Not sure if relevant in here but in Hadley's R packages book it mentions the following:
I only found out this wasn't the case after a fair bit of searching and finding this issue so assuming there might be others who think the same. It may be worth asking Hadley to update that part of the book since it is a pretty common resource? |
I agree we need a definitive ruling on this (I think |
I think it makes more sense if |
This is kind of related but not related. I think travis runs |
travis already sets |
Why don't we set it in |
Thank you @jimhester, 4663004 solves this for me by setting I noticed though that the documentation doesn't reflect the change yet (See PR, I just |
We do now set it in |
@jimhester oh got it; I just missed that you closed this issue with a fix. |
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/ |
I knew about this for a while but was surprised to learn that it is apparently not on purpose. As mentioned here,
devtools::check()
does not seem to automatically setSys.setenv(NOT_CRAN = "true")
whileBuild -> Check Package
in RStudio does.I created a minimal test package with a test that is supposed to fail locally but not on CRAN:
However when I run this via
devtools::check()
, it runs without error, presumably becauseNOT_CRAN
isn't set. If I useSys.setenv(NOT_CRAN = "true")
beforedevtools::check()
, everything works as intended.Tested on Ubuntu 18.04 and Win 10, R 3.6.1 with devtools 2.2.0 and 2.2.1.9000.
Console output (slightly redacted for readability):
The text was updated successfully, but these errors were encountered: