Skip to content

Commit

Permalink
Catch and report symlink failures when cloning a version.
Browse files Browse the repository at this point in the history
  • Loading branch information
LTLA committed Apr 23, 2024
1 parent cdce195 commit 78b782b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/cloneVersion.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ cloneVersion <- function(project, asset, version, destination, registry) {
for (x in names(listing)) {
dpath <- file.path(destination, x)
dir.create(dirname(dpath), showWarnings=FALSE)
file.symlink(file.path(target, x), dpath)
src <- file.path(target, x)
if (!file.symlink(src, dpath)) {
stop("failed to create a symlink from '", src, "' to '", dpath, "'")
}
}

invisible(NULL)
Expand Down

0 comments on commit 78b782b

Please sign in to comment.