From 46d4ffa4fc04899007d2af99278ad1d9f75bc79c Mon Sep 17 00:00:00 2001 From: siburny Date: Fri, 5 Apr 2024 07:01:50 -0400 Subject: [PATCH] Add option to overwrite the files on cache extraction --- packages/cache/src/internal/tar.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/cache/src/internal/tar.ts b/packages/cache/src/internal/tar.ts index adf61069..83695eed 100644 --- a/packages/cache/src/internal/tar.ts +++ b/packages/cache/src/internal/tar.ts @@ -111,6 +111,9 @@ async function getTarArgs( // Platform specific args if (tarPath.type === ArchiveToolType.GNU) { + // Make sure any existing files are overwritten + args.push('--overwrite') + switch (process.platform) { case 'win32': args.push('--force-local')