I have looked at a couple of different strategies for adding the line
_R_CHECK_LICENSE_=FALSE
to a .Renviron file:
Add it to the file in my home directory: I can get this to work robustly, but I may miss problems on open-source packages. This is not a show-stopper because Travis will find problems when I push to GitHub.
Create a .Renviron file specific to the root directory of any internal package (and add it to .Rbuildignore) - then put the line in. This limits the behavior to that package, but I lose all the variables I set in my "home" .Renviron. I understand that R considers no more than one.Renviron file.
I think solution (1) will work OK for me, but I wanted to ask the followon question - is there a way to direct a project .Renviron file to refer also to the "home" .Renviron file? If the answer is no, that's OK
or use a custom file to store your check related environment file and load this one before checking
readRenviron("check.env")
where check.env is
_R_CHECK_LICENSE_=FALSE
i think this should work. Most of the time... the only drawback is that some variable expansion are not done (like %V or %p for lib path - pretty annoying but it is like that).
Also, do not forget you have a env_vars argument in devtools::check(), specifically for this kind of use case. I think this is used that way