@@ -60361,10 +60361,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
60361
60361
step((generator = generator.apply(thisArg, _arguments || [])).next());
60362
60362
});
60363
60363
};
60364
+ var __importDefault = (this && this.__importDefault) || function (mod) {
60365
+ return (mod && mod.__esModule) ? mod : { "default": mod };
60366
+ };
60364
60367
Object.defineProperty(exports, "__esModule", ({ value: true }));
60365
60368
exports.run = void 0;
60366
60369
const core = __importStar(__nccwpck_require__(2186));
60367
60370
const cache = __importStar(__nccwpck_require__(7799));
60371
+ const fs_1 = __importDefault(__nccwpck_require__(7147));
60368
60372
const constants_1 = __nccwpck_require__(9042);
60369
60373
const cache_utils_1 = __nccwpck_require__(1678);
60370
60374
// Catch and log any unhandled exceptions. These exceptions can leak out of the uploadChunk method in
@@ -60389,13 +60393,14 @@ exports.run = run;
60389
60393
const cachePackages = (packageManager) => __awaiter(void 0, void 0, void 0, function* () {
60390
60394
const state = core.getState(constants_1.State.CacheMatchedKey);
60391
60395
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);
60393
60398
const packageManagerInfo = yield cache_utils_1.getPackageManagerInfo(packageManager);
60394
60399
if (!packageManagerInfo) {
60395
60400
core.debug(`Caching for '${packageManager}' is not supported`);
60396
60401
return;
60397
60402
}
60398
- if (cachePaths.length === 0 ) {
60403
+ if (! cachePaths.length) {
60399
60404
// TODO: core.getInput has a bug - it can return undefined despite its definition (tests only?)
60400
60405
// export declare function getInput(name: string, options?: InputOptions): string;
60401
60406
const cacheDependencyPath = core.getInput('cache-dependency-path') || '';
0 commit comments