Skip to content

Commit 5e21ff4

Browse files
authoredAug 15, 2023
Remove filter for cached paths (#831)
1 parent bea5baf commit 5e21ff4

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed
 

‎dist/cache-save/index.js

+1-6
Original file line numberDiff line numberDiff line change
@@ -60361,14 +60361,10 @@ 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-
};
6036760364
Object.defineProperty(exports, "__esModule", ({ value: true }));
6036860365
exports.run = void 0;
6036960366
const core = __importStar(__nccwpck_require__(2186));
6037060367
const cache = __importStar(__nccwpck_require__(7799));
60371-
const fs_1 = __importDefault(__nccwpck_require__(7147));
6037260368
const constants_1 = __nccwpck_require__(9042);
6037360369
const cache_utils_1 = __nccwpck_require__(1678);
6037460370
// Catch and log any unhandled exceptions. These exceptions can leak out of the uploadChunk method in
@@ -60393,8 +60389,7 @@ exports.run = run;
6039360389
const cachePackages = (packageManager) => __awaiter(void 0, void 0, void 0, function* () {
6039460390
const state = core.getState(constants_1.State.CacheMatchedKey);
6039560391
const primaryKey = core.getState(constants_1.State.CachePrimaryKey);
60396-
let cachePaths = JSON.parse(core.getState(constants_1.State.CachePaths) || '[]');
60397-
cachePaths = cachePaths.filter(fs_1.default.existsSync);
60392+
const cachePaths = JSON.parse(core.getState(constants_1.State.CachePaths) || '[]');
6039860393
const packageManagerInfo = yield cache_utils_1.getPackageManagerInfo(packageManager);
6039960394
if (!packageManagerInfo) {
6040060395
core.debug(`Caching for '${packageManager}' is not supported`);

‎src/cache-save.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import * as core from '@actions/core';
22
import * as cache from '@actions/cache';
33

4-
import fs from 'fs';
5-
64
import {State} from './constants';
75
import {getPackageManagerInfo} from './cache-utils';
86

@@ -26,10 +24,9 @@ export async function run() {
2624
const cachePackages = async (packageManager: string) => {
2725
const state = core.getState(State.CacheMatchedKey);
2826
const primaryKey = core.getState(State.CachePrimaryKey);
29-
let cachePaths = JSON.parse(
27+
const cachePaths = JSON.parse(
3028
core.getState(State.CachePaths) || '[]'
3129
) as string[];
32-
cachePaths = cachePaths.filter(fs.existsSync);
3330

3431
const packageManagerInfo = await getPackageManagerInfo(packageManager);
3532
if (!packageManagerInfo) {

0 commit comments

Comments
 (0)
Failed to load comments.