try_use_renv: Try to use renv

Description Usage Arguments Details Value

View source: R/utils-renv.R

Description

We use this when sandpaper starts to see if the user has previously consented to renv. The problem is that renv::consent() throws TRUE if the user has consented and an error if it has not :(

Usage

1

Arguments

force

if TRUE, consent is forced to be TRUE, creating the cache directory if it did not exist before. Defaults to FALSE, which gently inquires for consent.

Details

This function wraps renv::consent() in a callr function and transforms the error into FALSE. It sets the sandpaper.use_renv variable to the value of that check and then returns the full text of the output if FALSE (this is the WELCOME message that's given when someone uses renv for the first time) and the last line of output if TRUE (a message either that a directory has been created or that consent has already been provided.)

Value

a character vector


zkamvar/sandpaper documentation built on Nov. 25, 2021, 1:16 p.m.