| 1 |
|
| 2 |
renv_warnings_unknown_sources <- function(records) { |
| 3 |
|
| 4 |
if (empty(records)) |
| 5 |
return(FALSE) |
| 6 |
|
| 7 |
# TODO: Should this be documented? |
| 8 |
enabled <- renv_config_get( |
| 9 |
name = "unknown.sources", |
| 10 |
scope = "warnings", |
| 11 |
type = "logical[1]", |
| 12 |
default = TRUE |
| 13 |
) |
| 14 |
|
| 15 |
if (!enabled) |
| 16 |
return(FALSE) |
| 17 |
|
| 18 |
renv_scope_options(renv.verbose = TRUE) |
| 19 |
renv_pretty_print_records( |
| 20 |
"The following package(s) were installed from an unknown source:", |
| 21 |
records, |
| 22 |
c( |
| 23 |
"renv may be unable to restore these packages in the future.", |
| 24 |
"Consider reinstalling these packages from a known source (e.g. CRAN)." |
| 25 |
) |
| 26 |
) |
| 27 |
|
| 28 |
return(TRUE) |
| 29 |
|
| 30 |
} |