Skip to content

Commit

Permalink
Merge pull request #72 from cstepper/wbt_install-unlink-zip
Browse files Browse the repository at this point in the history
wbt_install: remove downloaded zip file when exiting function
  • Loading branch information
brownag authored Apr 13, 2022
2 parents 3ddfc4b + 15bebd6 commit 6a57171
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R/wbt.R
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,10 @@ wbt_install <- function(pkg_dir = find.package("whitebox"), force = FALSE) {
cat("\t", url, "\n")
cat("(This could take a few minutes, please be patient...)\n")

# path for downloaded zip file;
# remove downloaded zip file when exiting function
exe_zip <- file.path(pkg_dir, filename)
on.exit(unlink(exe_zip), add = TRUE)

if (!dir.exists(pkg_dir)) {
dir.create(pkg_dir, recursive = TRUE)
Expand Down

0 comments on commit 6a57171

Please sign in to comment.