Skip to content

Commit cbe0899

Browse files
use tempfile directly
1 parent 22b3603 commit cbe0899

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

inst/hooks/exported/parsable-R.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ files <- commandArgs(trailing = TRUE)
44
out <- lapply(files, function(path) {
55
is_rmd <- grepl("\\.[rR]md$", path)
66
if (is_rmd) {
7-
dir <- tempdir()
87
path <- knitr::purl(
98
input = path,
10-
output = paste0(dir, "/file.R"),
9+
output = tempfile(fileext = ".R"),
1110
quiet = TRUE,
1211
documentation = FALSE
1312
)

0 commit comments

Comments
 (0)