if you use readRenviron() you can manage that. You can put something in your project .Rprofile or just in a script
Either load both Renviron
readRenviron("~/.Renviron")
readRenviron("./.Renviron")
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
devtools::check(env_vars = c(_R_CHECK_LICENSE_= FALSE))
This would be the simpler for those variable dedicated to checking
.
Hope it helps