From 1912e50058c5dc6aad0e3fe5b9b3b976206d24a8 Mon Sep 17 00:00:00 2001 From: Sergey Dolin Date: Tue, 14 Feb 2023 19:09:14 +0100 Subject: [PATCH] debug Could not get cache folder paths. --- dist/cache-save/index.js | 4 ++-- dist/setup/index.js | 4 ++-- src/cache-restore.ts | 2 ++ src/cache-save.ts | 2 ++ src/cache-utils.ts | 2 -- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/dist/cache-save/index.js b/dist/cache-save/index.js index 79ddc1bdb..5231b7522 100644 --- a/dist/cache-save/index.js +++ b/dist/cache-save/index.js @@ -60345,6 +60345,8 @@ process.on('uncaughtException', e => { }); function run() { return __awaiter(this, void 0, void 0, function* () { + var stack = new Error().stack; + console.log(stack); try { yield cachePackages(); } @@ -60466,8 +60468,6 @@ const getCacheDirectoryPath = (packageManagerInfo) => __awaiter(void 0, void 0, output.value) .map(output => output.value); if (!cachePaths.length) { - var stack = new Error().stack; - console.log(stack); throw new Error(`Could not get cache folder paths.`); } return cachePaths; diff --git a/dist/setup/index.js b/dist/setup/index.js index 8ac007fd0..75ad72891 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -63033,6 +63033,8 @@ const fs_1 = __importDefault(__nccwpck_require__(7147)); const constants_1 = __nccwpck_require__(9042); const cache_utils_1 = __nccwpck_require__(1678); const restoreCache = (versionSpec, packageManager, cacheDependencyPath) => __awaiter(void 0, void 0, void 0, function* () { + var stack = new Error().stack; + console.log(stack); const packageManagerInfo = yield cache_utils_1.getPackageManagerInfo(packageManager); const platform = process.env.RUNNER_OS; const cachePaths = yield cache_utils_1.getCacheDirectoryPath(packageManagerInfo); @@ -63139,8 +63141,6 @@ const getCacheDirectoryPath = (packageManagerInfo) => __awaiter(void 0, void 0, output.value) .map(output => output.value); if (!cachePaths.length) { - var stack = new Error().stack; - console.log(stack); throw new Error(`Could not get cache folder paths.`); } return cachePaths; diff --git a/src/cache-restore.ts b/src/cache-restore.ts index 930122c1b..215210b7c 100644 --- a/src/cache-restore.ts +++ b/src/cache-restore.ts @@ -13,6 +13,8 @@ export const restoreCache = async ( packageManager: string, cacheDependencyPath?: string ) => { + var stack = new Error().stack + console.log( stack ) const packageManagerInfo = await getPackageManagerInfo(packageManager); const platform = process.env.RUNNER_OS; diff --git a/src/cache-save.ts b/src/cache-save.ts index 6c5d3fa89..eda96bc96 100644 --- a/src/cache-save.ts +++ b/src/cache-save.ts @@ -13,6 +13,8 @@ process.on('uncaughtException', e => { }); export async function run() { + var stack = new Error().stack + console.log( stack ) try { await cachePackages(); } catch (error) { diff --git a/src/cache-utils.ts b/src/cache-utils.ts index 3fe547d7c..467dbead6 100644 --- a/src/cache-utils.ts +++ b/src/cache-utils.ts @@ -59,8 +59,6 @@ export const getCacheDirectoryPath = async ( .map(output => (output as PromiseFulfilledResult).value); if (!cachePaths.length) { - var stack = new Error().stack - console.log( stack ) throw new Error(`Could not get cache folder paths.`); }