Skip to content

Commit 7648d28

Browse files
ROBUSTNESS: More assertions to batchtools_template()
1 parent 87d414f commit 7648d28

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

R/batchtools_template.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ batchtools_by_template <- function(expr, envir = parent.frame(),
148148
template <- formals(make_cfs)$template
149149
}
150150

151-
stop_if_not(is.character(template), length(template) == 1, nzchar(template))
151+
stop_if_not(is.character(template), length(template) == 1L,
152+
!is.na(template), nzchar(template))
152153

153154
## Tweaked search for template file
154155
findTemplateFile <- import_batchtools("findTemplateFile", default = NA)

0 commit comments

Comments
 (0)