Skip to content

Commit 7cbdf29

Browse files
authored
Merge pull request #41 from buildkite-plugins/toote_fs_recursion
FS backend recursive saves
2 parents be47d74 + 50c58ac commit 7cbdf29

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

backends/cache_fs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ restore_cache() {
1111
save_cache() {
1212
local to="${CACHE_FOLDER}/$1"
1313
local from="$2"
14+
15+
if [ -n "$1" ] && [ -e "$to" ]; then
16+
rm -rf "$to"
17+
fi
1418
cp -a "$from" "$to"
1519
}
1620

0 commit comments

Comments
 (0)