From acb36139c9c2a9c0e46a5185674cf04606b09fbb Mon Sep 17 00:00:00 2001 From: Miha Krajnc <30954380+mihoci10@users.noreply.github.com> Date: Thu, 10 Oct 2024 16:12:08 -0700 Subject: [PATCH 1/3] Fix issue with invalid path when restoring files --- src/main.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.ts b/src/main.ts index 32dca16..2b11dde 100644 --- a/src/main.ts +++ b/src/main.ts @@ -15,13 +15,13 @@ async function main(): Promise { switch (options.strategy) { case 'copy-immutable': case 'copy': - await cp(cachePath, targetPath, { + await cp(cachePath, targetDir, { copySourceDirectory: false, recursive: true, }) break case 'move': - await mv(cachePath, targetPath, { force: true }) + await mv(cachePath, targetDir, { force: true }) break } From c60786434a053ee44f97f6be493b3a94f6ee7863 Mon Sep 17 00:00:00 2001 From: Miha Krajnc <30954380+mihoci10@users.noreply.github.com> Date: Thu, 10 Oct 2024 16:23:54 -0700 Subject: [PATCH 2/3] Update node version --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 05c15ca..e738d21 100644 --- a/action.yml +++ b/action.yml @@ -15,7 +15,7 @@ outputs: cache-hit: description: 'A boolean value to indicate if cache was found and restored' runs: - using: 'node16' + using: 'node20' main: 'dist/main.js' post: 'dist/post.js' post-if: success() From 4bc671d4c411aebb13f225d43dfe5236df02f735 Mon Sep 17 00:00:00 2001 From: Miha Krajnc <30954380+mihoci10@users.noreply.github.com> Date: Thu, 10 Oct 2024 16:31:21 -0700 Subject: [PATCH 3/3] Fix target path for moving the cache --- src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 2b11dde..50f1fbd 100644 --- a/src/main.ts +++ b/src/main.ts @@ -21,7 +21,7 @@ async function main(): Promise { }) break case 'move': - await mv(cachePath, targetDir, { force: true }) + await mv(cachePath, targetPath, { force: true }) break }