diff --git a/R/wbt.R b/R/wbt.R index db3366a43..29f113da3 100644 --- a/R/wbt.R +++ b/R/wbt.R @@ -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)