-
Notifications
You must be signed in to change notification settings - Fork 161
Closed
Description
Use a non-renv project where the R library does not contain a package. In my case, the R library is missing tidyr and there is an R file containing a library(tidyr) statement.
options(renv.verbose = FALSE)
deps <- renv::dependencies(getwd())
renv::snapshot(getwd(), packages = deps$Package, prompt = FALSE)
#> What do you want to do?
#>
#> 1: Snapshot, just using the currently installed packages.
#> 2: Install the packages, then snapshot.
#> 3: Cancel, and resolve the situation on your own.
#>
#> Selection: 3
#> - Operation canceled.
options(renv.verbose = NULL)
renv::snapshot(getwd(), packages = deps$Package, prompt = FALSE)
#> The following required packages are not installed:
#> - tidyr
#> Packages must first be installed before renv can snapshot them.
#> Use `renv::dependencies()` to see where this package is used in your project.
#>
#> What do you want to do?
#>
#> 1: Snapshot, just using the currently installed packages.
#> 2: Install the packages, then snapshot.
#> 3: Cancel, and resolve the situation on your own.
#>
#> Selection: 3
#> - Operation canceled.When run in a non-interactive session, the output is even less helpful:
- Operation canceled.
Execution halted
Metadata
Metadata
Assignees
Labels
No labels