Skip to content
This repository was archived by the owner on Jan 2, 2022. It is now read-only.

Commit 986eca7

Browse files
committed
perf: move files instead of copying
Signed-off-by: Jonah Snider <[email protected]>
1 parent 10dcb9d commit 986eca7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ module.exports = {
6161
// - the file/directory has not been cached yet
6262
async onPreBuild({utils, inputs}: NetlifyOpts) {
6363
const paths = generateAbsolutePaths({inputs});
64-
const success = await utils.cache.restore(paths.absolute.buildDir);
64+
const success = await utils.cache.restore(paths.absolute.buildDir, {move: true});
6565

6666
if (success) {
6767
console.log(`Restored the cached ${paths.buildDirName} folder at the location \`${paths.absolute.buildDir}\``);
@@ -79,7 +79,8 @@ module.exports = {
7979
const paths = generateAbsolutePaths({inputs});
8080

8181
const success = await utils.cache.save(paths.absolute.buildDir, {
82-
digests: [paths.absolute.manifest]
82+
digests: [paths.absolute.manifest],
83+
move: true
8384
});
8485

8586
if (success) {

0 commit comments

Comments
 (0)