@@ -60361,10 +60361,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
6036160361 step((generator = generator.apply(thisArg, _arguments || [])).next());
6036260362 });
6036360363};
60364+ var __importDefault = (this && this.__importDefault) || function (mod) {
60365+ return (mod && mod.__esModule) ? mod : { "default": mod };
60366+ };
6036460367Object.defineProperty(exports, "__esModule", ({ value: true }));
6036560368exports.run = void 0;
6036660369const core = __importStar(__nccwpck_require__(2186));
6036760370const cache = __importStar(__nccwpck_require__(7799));
60371+ const fs_1 = __importDefault(__nccwpck_require__(7147));
6036860372const constants_1 = __nccwpck_require__(9042);
6036960373const cache_utils_1 = __nccwpck_require__(1678);
6037060374// Catch and log any unhandled exceptions. These exceptions can leak out of the uploadChunk method in
@@ -60389,13 +60393,14 @@ exports.run = run;
6038960393const cachePackages = (packageManager) => __awaiter(void 0, void 0, void 0, function* () {
6039060394 const state = core.getState(constants_1.State.CacheMatchedKey);
6039160395 const primaryKey = core.getState(constants_1.State.CachePrimaryKey);
60392- const cachePaths = JSON.parse(core.getState(constants_1.State.CachePaths) || '[]');
60396+ let cachePaths = JSON.parse(core.getState(constants_1.State.CachePaths) || '[]');
60397+ cachePaths = cachePaths.filter(fs_1.default.existsSync);
6039360398 const packageManagerInfo = yield cache_utils_1.getPackageManagerInfo(packageManager);
6039460399 if (!packageManagerInfo) {
6039560400 core.debug(`Caching for '${packageManager}' is not supported`);
6039660401 return;
6039760402 }
60398- if (cachePaths.length === 0 ) {
60403+ if (! cachePaths.length) {
6039960404 // TODO: core.getInput has a bug - it can return undefined despite its definition (tests only?)
6040060405 // export declare function getInput(name: string, options?: InputOptions): string;
6040160406 const cacheDependencyPath = core.getInput('cache-dependency-path') || '';
0 commit comments