From 99e13fd84d0c6c444f17b1bcda753ed7a5364791 Mon Sep 17 00:00:00 2001 From: HarithaVattikuti <73516759+HarithaVattikuti@users.noreply.github.com> Date: Thu, 21 Dec 2023 20:19:19 -0600 Subject: [PATCH] test --- __tests__/cache-restore.test.ts | 2 +- dist/setup/index.js | 4 +++- src/cache-restore.ts | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/__tests__/cache-restore.test.ts b/__tests__/cache-restore.test.ts index 770497a70..0bc51a0c6 100644 --- a/__tests__/cache-restore.test.ts +++ b/__tests__/cache-restore.test.ts @@ -12,7 +12,7 @@ describe('cache-restore', () => { process.env.RUNNER_OS = 'Linux'; } if (!process.env.RUNNER_ARCH) { - process.env.RUNNER_ARCH = 'X64'; + process.env.RUNNER_ARCH = 'x64'; } const platform = process.env.RUNNER_OS; const arch = process.env.RUNNER_ARCH; diff --git a/dist/setup/index.js b/dist/setup/index.js index 09ce2d617..517e58797 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -92559,6 +92559,7 @@ const core = __importStar(__nccwpck_require__(2186)); const glob = __importStar(__nccwpck_require__(8090)); const path_1 = __importDefault(__nccwpck_require__(1017)); const fs_1 = __importDefault(__nccwpck_require__(7147)); +const os_1 = __importDefault(__nccwpck_require__(2037)); const constants_1 = __nccwpck_require__(9042); const cache_utils_1 = __nccwpck_require__(1678); const restoreCache = (packageManager, cacheDependencyPath) => __awaiter(void 0, void 0, void 0, function* () { @@ -92567,7 +92568,7 @@ const restoreCache = (packageManager, cacheDependencyPath) => __awaiter(void 0, throw new Error(`Caching for '${packageManager}' is not supported`); } const platform = process.env.RUNNER_OS; - const arch = process.env.RUNNER_ARCH; + const arch = os_1.default.arch(); core.debug(`PM info is ${packageManagerInfo}`); core.debug(`cacheDependencyPath info is ${cacheDependencyPath}`); const cachePaths = yield (0, cache_utils_1.getCacheDirectories)(packageManagerInfo, cacheDependencyPath); @@ -92580,6 +92581,7 @@ const restoreCache = (packageManager, cacheDependencyPath) => __awaiter(void 0, if (!fileHash) { throw new Error('Some specified paths were not resolved, unable to cache dependencies.'); } + core.debug("arch is " + arch); const keyPrefix = `node-cache-${platform}-${arch}-${packageManager}`; const primaryKey = `${keyPrefix}-${fileHash}`; core.debug(`primary key is ${primaryKey}`); diff --git a/src/cache-restore.ts b/src/cache-restore.ts index a6612f4c8..96780d105 100644 --- a/src/cache-restore.ts +++ b/src/cache-restore.ts @@ -44,6 +44,7 @@ export const restoreCache = async ( ); } + core.debug("arch is "+arch); const keyPrefix = `node-cache-${platform}-${arch}-${packageManager}`; const primaryKey = `${keyPrefix}-${fileHash}`; core.debug(`primary key is ${primaryKey}`);