|
|
|
@ -61194,7 +61194,9 @@ const cache_utils_1 = __nccwpck_require__(1678);
|
|
|
|
|
const restoreCache = (versionSpec, packageManager, cacheDependencyPath) => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
|
|
const packageManagerInfo = yield cache_utils_1.getPackageManagerInfo(packageManager);
|
|
|
|
|
const platform = process.env.RUNNER_OS;
|
|
|
|
|
const cachePaths = yield cache_utils_1.getCacheDirectoryPath(packageManagerInfo);
|
|
|
|
|
const cachePaths = yield cache_utils_1.getCacheDirectoryPath(packageManagerInfo, {
|
|
|
|
|
env: Object.assign(Object.assign({}, process.env), { GOTOOLCHAIN: 'local' })
|
|
|
|
|
});
|
|
|
|
|
const dependencyFilePath = cacheDependencyPath
|
|
|
|
|
? cacheDependencyPath
|
|
|
|
|
: findDependencyFile(packageManagerInfo);
|
|
|
|
@ -61270,8 +61272,8 @@ const cache = __importStar(__nccwpck_require__(7799));
|
|
|
|
|
const core = __importStar(__nccwpck_require__(2186));
|
|
|
|
|
const exec = __importStar(__nccwpck_require__(1514));
|
|
|
|
|
const package_managers_1 = __nccwpck_require__(6663);
|
|
|
|
|
const getCommandOutput = (toolCommand) => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
|
|
let { stdout, stderr, exitCode } = yield exec.getExecOutput(toolCommand, undefined, { ignoreReturnCode: true });
|
|
|
|
|
const getCommandOutput = (toolCommand, execOpts) => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
|
|
let { stdout, stderr, exitCode } = yield exec.getExecOutput(toolCommand, undefined, Object.assign(Object.assign({}, execOpts), { ignoreReturnCode: true }));
|
|
|
|
|
if (exitCode) {
|
|
|
|
|
stderr = !stderr.trim()
|
|
|
|
|
? `The '${toolCommand}' command failed with exit code: ${exitCode}`
|
|
|
|
@ -61289,8 +61291,8 @@ const getPackageManagerInfo = (packageManager) => __awaiter(void 0, void 0, void
|
|
|
|
|
return obtainedPackageManager;
|
|
|
|
|
});
|
|
|
|
|
exports.getPackageManagerInfo = getPackageManagerInfo;
|
|
|
|
|
const getCacheDirectoryPath = (packageManagerInfo) => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
|
|
const pathOutputs = yield Promise.allSettled(packageManagerInfo.cacheFolderCommandList.map((command) => __awaiter(void 0, void 0, void 0, function* () { return exports.getCommandOutput(command); })));
|
|
|
|
|
const getCacheDirectoryPath = (packageManagerInfo, execOpts) => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
|
|
const pathOutputs = yield Promise.allSettled(packageManagerInfo.cacheFolderCommandList.map((command) => __awaiter(void 0, void 0, void 0, function* () { return exports.getCommandOutput(command, execOpts); })));
|
|
|
|
|
const results = pathOutputs.map(item => {
|
|
|
|
|
if (item.status === 'fulfilled') {
|
|
|
|
|
return item.value;
|
|
|
|
|