Skip to content

Commit

Permalink
close #509: use a temp file under the current dir (which is more visi…
Browse files Browse the repository at this point in the history
…ble) to store _bookdown.yml
  • Loading branch information
yihui committed Dec 31, 2017
1 parent 7b71066 commit 38efc82
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: bookdown
Type: Package
Title: Authoring Books and Technical Documents with R Markdown
Version: 0.5.14
Version: 0.5.15
Date: 2017-08-20
Authors@R: c(
person("Yihui", "Xie", role = c("aut", "cre"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666")),
Expand Down
2 changes: 1 addition & 1 deletion R/render.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ render_book = function(
if (clean_envir) rm(list = ls(envir, all.names = TRUE), envir = envir)

if (config_file != '_bookdown.yml') {
unlink(tmp_config <- tempfile())
unlink(tmp_config <- tempfile('_bookdown_', '.', '.yml'))
if (file.exists('_bookdown.yml')) file.rename('_bookdown.yml', tmp_config)
file.rename(config_file, '_bookdown.yml')
on.exit({
Expand Down

0 comments on commit 38efc82

Please sign in to comment.