From b1433cb0baf4ca319eb756f0e54d9742f272e4fb Mon Sep 17 00:00:00 2001 From: Maxim Rubis Date: Wed, 4 Dec 2024 19:02:04 -0500 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')