Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
HarithaVattikuti committed Dec 22, 2023
1 parent af5791b commit 99e13fd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion __tests__/cache-restore.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 3 additions & 1 deletion dist/setup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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* () {
Expand All @@ -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);
Expand All @@ -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}`);
Expand Down
1 change: 1 addition & 0 deletions src/cache-restore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand Down

0 comments on commit 99e13fd

Please sign in to comment.