@@ -65,11 +65,11 @@ assemble_copyright_notice <- function(path) {
6565 if (desc :: desc_has_fields(keys = " Authors@R" ,
6666 file = path )) {
6767
68- pkg <- pal :: desc_value (key = " Package" ,
69- file = path )
70- desc <- pal :: desc_value (key = " Title" ,
71- default = " " ,
72- file = path )
68+ pkg <- pal :: desc_get_field_safe (key = " Package" ,
69+ file = path )
70+ desc <- pal :: desc_get_field_safe (key = " Title" ,
71+ default = " " ,
72+ file = path )
7373 authors <-
7474 desc :: desc_get_authors(file = path ) | >
7575 # reduce to copyright holders or otherwise authors
@@ -108,8 +108,8 @@ assemble_license_notice <- function(path) {
108108 if (desc :: desc_has_fields(keys = " License" ,
109109 file = path )) {
110110
111- license <- pal :: desc_value (key = " License" ,
112- file = path )
111+ license <- pal :: desc_get_field_safe (key = " License" ,
112+ file = path )
113113
114114 if (grepl(x = license ,
115115 pattern = " ^\\ s*(AGPL ?\\ (>= ?3\\ )|AGPL-3\\ .0-or-later)\\ s*$" )) {
@@ -226,8 +226,8 @@ main_rmd <- function(path = ".") {
226226 rmd_file_paths | >
227227 fs :: path_file() | >
228228 fs :: path_ext_remove() | >
229- magrittr :: is_in(pal :: desc_value (key = " Package" ,
230- file = path )) | >
229+ magrittr :: is_in(pal :: desc_get_field_safe (key = " Package" ,
230+ file = path )) | >
231231 which() %> %
232232 magrittr :: extract(rmd_file_paths , . ) | >
233233 pal :: when(length(. ) > 1L ~ # this is theoretically possible in case of subdirs under `Rmd/` or for case-sensitive filesystems (both `.Rmd` and `.rmd`)
0 commit comments