fix previous logic

This commit is contained in:
Dmitry Shibanov 2023-04-03 16:13:04 +02:00
parent 3091b37310
commit fca93898f9
3 changed files with 23 additions and 2 deletions

View file

@ -59628,7 +59628,12 @@ function run() {
exports.run = run;
function saveCache(packageManager) {
return __awaiter(this, void 0, void 0, function* () {
const cachePaths = JSON.parse(core.getState(cache_distributor_1.State.CACHE_PATHS));
const cachePathState = core.getState(cache_distributor_1.State.CACHE_PATHS);
if (!cachePathState) {
core.warning('State paths for saving/restoring is empty. Could you please check previous logs and verify that the version python is specified version?');
return;
}
const cachePaths = JSON.parse(cachePathState);
core.debug(`paths for caching are ${cachePaths.join(', ')}`);
if (!isCacheDirectoryExists(cachePaths)) {
throw new Error(`Cache folder path is retrieved for ${packageManager} but doesn't exist on disk: ${cachePaths.join(', ')}`);