Skip to content

Commit

Permalink
Unlink existing check directory
Browse files Browse the repository at this point in the history
  • Loading branch information
jimhester committed Oct 19, 2018
1 parent 21f9732 commit 1e70510
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions R/package.R
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@ do_check <- function(targz, package, args, libpath, repos,
profile <- make_fake_profile(session_output = session_output)
on.exit(unlink(profile), add = TRUE)

# if the pkg.Rcheck directory already exists, unlink it
check_dir <- paste0(package, ".Rcheck")
if (file.exists(check_dir)) {
unlink(check_dir, recursive = TRUE)
}

if (!quiet) cat_head("R CMD check")
res <- with_envvar(
c(R_PROFILE_USER = profile,
Expand Down

0 comments on commit 1e70510

Please sign in to comment.