From aaf79d8a01057a3c84ca77f6c52eaaf053c1d27f Mon Sep 17 00:00:00 2001 From: Jenny Bryan Date: Sat, 13 Feb 2021 13:02:49 -0800 Subject: [PATCH] Check that `package` is installed when using a template Closes #1368 --- R/template.R | 1 + 1 file changed, 1 insertion(+) diff --git a/R/template.R b/R/template.R index 4dbe29412..d001b7c17 100644 --- a/R/template.R +++ b/R/template.R @@ -63,6 +63,7 @@ render_template <- function(template, data = list(), package = "usethis") { } find_template <- function(template_name, package = "usethis") { + check_installed(package) path <- tryCatch( path_package(package = package, "templates", template_name), error = function(e) ""