Skip to content

Commit

Permalink
Check that package is installed when using a template
Browse files Browse the repository at this point in the history
Closes r-lib#1368
  • Loading branch information
jennybc committed Feb 13, 2021
1 parent 85e719d commit aaf79d8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions R/template.R
Original file line number Diff line number Diff line change
Expand Up @@ -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) ""
Expand Down

0 comments on commit aaf79d8

Please sign in to comment.