Skip to content

Empty / unnamed repositories can crash renv::snapshot() #811

@kamilzyla

Description

@kamilzyla

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions