Problem
The following sequence of commands:
options(repos = NULL)
renv::init()
options(repos = "https://cloud.r-project.org")
renv::snapshot()
Will result in the following error:
Error in mapply(renv_lockfile_diff_impl, old, new, MoreArgs = list(compare = compare), :
zero-length inputs cannot be mixed with those of non-zero length
Expected behavior
Renv should either save the unnamed repository (as it does if we don't first set repos = NULL) or refuse to use unnamed repository with a meaningful message.