Skip to content

Commit 70966ea

Browse files
chore: clean up vendor dir after vendor_pkgs() (#454)
* chore: clean up vendor dir after `vendor_pkgs()` * chore: add exist condition --------- Co-authored-by: Ilia Kosenkov <ilia.kosenkov@outlook.com>
1 parent 48fc985 commit 70966ea

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

R/cran-compliance.R

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,12 @@ vendor_pkgs <- function(path = ".", quiet = FALSE, overwrite = NULL) {
118118
)
119119
}
120120

121+
# clean up vendor directory
122+
if (dir.exists(file.path(src_dir, "vendor"))) {
123+
cli::cli_alert_info("Removing {.path src/rust/vendor} directory")
124+
unlink(file.path(src_dir, "vendor"), recursive = TRUE)
125+
}
126+
121127
# return packages and versions invisibly
122128
invisible(res)
123129
}

0 commit comments

Comments
 (0)