Skip to content

Commit

Permalink
Overwrite files if they exist
Browse files Browse the repository at this point in the history
The default behavior of `file.copy()` is _not_ to overwrite files
(without an error or warning) if they already exist. So if there was
already a built tarball in the check directory it would not be updated.

cc @jennybc
  • Loading branch information
jimhester committed Oct 18, 2018
1 parent 6a3afa2 commit 21f9732
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion R/build.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ build_package <- function(path, tmpdir, build_args, libpath, quiet) {
)

} else {
file.copy(path, tmpdir)
file.copy(path, tmpdir, overwrite = TRUE)
file.path(tmpdir, basename(path))
}
}
3 changes: 3 additions & 0 deletions inst/NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@

# devel

* `rcmdcheck()` now correctly overwrites existing tarballs if they already
exist in the check directory (#84 @jimhester).

# 1.3.0

* New `rcmdcheck_process` class to run `R CMD check` in the background.
Expand Down

0 comments on commit 21f9732

Please sign in to comment.