diff --git a/dist/restore-only/index.js b/dist/restore-only/index.js index 5a450e3c5..af91a81ad 100644 --- a/dist/restore-only/index.js +++ b/dist/restore-only/index.js @@ -64018,7 +64018,7 @@ function restoreImpl(stateProvider) { const enableCrossOsArchive = utils.getInputAsBool(constants_1.Inputs.EnableCrossOsArchive); const failOnCacheMiss = utils.getInputAsBool(constants_1.Inputs.FailOnCacheMiss); const lookupOnly = utils.getInputAsBool(constants_1.Inputs.LookupOnly); - const cacheKey = yield cache.restoreCache(cachePaths, primaryKey, restoreKeys, { lookupOnly: lookupOnly }, enableCrossOsArchive, s3config, s3BucketName); + const cacheKey = yield cache.restoreCache(cachePaths.slice(), primaryKey, restoreKeys, { lookupOnly: lookupOnly }, enableCrossOsArchive, s3config, s3BucketName); if (!cacheKey) { if (failOnCacheMiss) { throw new Error(`Failed to restore cache entry. Exiting as fail-on-cache-miss is set. Input key: ${primaryKey}`); diff --git a/dist/restore/index.js b/dist/restore/index.js index f5586887c..8f9812aed 100644 --- a/dist/restore/index.js +++ b/dist/restore/index.js @@ -64018,7 +64018,7 @@ function restoreImpl(stateProvider) { const enableCrossOsArchive = utils.getInputAsBool(constants_1.Inputs.EnableCrossOsArchive); const failOnCacheMiss = utils.getInputAsBool(constants_1.Inputs.FailOnCacheMiss); const lookupOnly = utils.getInputAsBool(constants_1.Inputs.LookupOnly); - const cacheKey = yield cache.restoreCache(cachePaths, primaryKey, restoreKeys, { lookupOnly: lookupOnly }, enableCrossOsArchive, s3config, s3BucketName); + const cacheKey = yield cache.restoreCache(cachePaths.slice(), primaryKey, restoreKeys, { lookupOnly: lookupOnly }, enableCrossOsArchive, s3config, s3BucketName); if (!cacheKey) { if (failOnCacheMiss) { throw new Error(`Failed to restore cache entry. Exiting as fail-on-cache-miss is set. Input key: ${primaryKey}`); diff --git a/dist/save-only/index.js b/dist/save-only/index.js index fc88726c8..c6ec1b79e 100644 --- a/dist/save-only/index.js +++ b/dist/save-only/index.js @@ -100292,7 +100292,7 @@ function saveImpl(stateProvider) { const s3BucketName = core.getInput(constants_1.Inputs.AWSS3Bucket); const s3config = utils.getInputS3ClientConfig(); const enableCrossOsArchive = utils.getInputAsBool(constants_1.Inputs.EnableCrossOsArchive); - cacheId = yield cache.saveCache(cachePaths, primaryKey, { uploadChunkSize: utils.getInputAsInt(constants_1.Inputs.UploadChunkSize) }, enableCrossOsArchive, s3config, s3BucketName); + cacheId = yield cache.saveCache(cachePaths.slice(), primaryKey, { uploadChunkSize: utils.getInputAsInt(constants_1.Inputs.UploadChunkSize) }, enableCrossOsArchive, s3config, s3BucketName); if (cacheId != -1) { core.info(`Cache saved with key: ${primaryKey}`); } diff --git a/dist/save/index.js b/dist/save/index.js index 3b174c4e1..ce012d0ba 100644 --- a/dist/save/index.js +++ b/dist/save/index.js @@ -100265,7 +100265,7 @@ function saveImpl(stateProvider) { const s3BucketName = core.getInput(constants_1.Inputs.AWSS3Bucket); const s3config = utils.getInputS3ClientConfig(); const enableCrossOsArchive = utils.getInputAsBool(constants_1.Inputs.EnableCrossOsArchive); - cacheId = yield cache.saveCache(cachePaths, primaryKey, { uploadChunkSize: utils.getInputAsInt(constants_1.Inputs.UploadChunkSize) }, enableCrossOsArchive, s3config, s3BucketName); + cacheId = yield cache.saveCache(cachePaths.slice(), primaryKey, { uploadChunkSize: utils.getInputAsInt(constants_1.Inputs.UploadChunkSize) }, enableCrossOsArchive, s3config, s3BucketName); if (cacheId != -1) { core.info(`Cache saved with key: ${primaryKey}`); } diff --git a/src/restoreImpl.ts b/src/restoreImpl.ts index 86eb33587..ef75f4040 100644 --- a/src/restoreImpl.ts +++ b/src/restoreImpl.ts @@ -45,7 +45,7 @@ export async function restoreImpl( const lookupOnly = utils.getInputAsBool(Inputs.LookupOnly); const cacheKey = await cache.restoreCache( - cachePaths, + cachePaths.slice(), primaryKey, restoreKeys, { lookupOnly: lookupOnly }, diff --git a/src/saveImpl.ts b/src/saveImpl.ts index 0dd8df381..ff9710679 100644 --- a/src/saveImpl.ts +++ b/src/saveImpl.ts @@ -59,7 +59,7 @@ async function saveImpl(stateProvider: IStateProvider): Promise { ); cacheId = await cache.saveCache( - cachePaths, + cachePaths.slice(), primaryKey, { uploadChunkSize: utils.getInputAsInt(Inputs.UploadChunkSize) }, enableCrossOsArchive,