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

@ -17,7 +17,16 @@ export async function run() {
}
async function saveCache(packageManager: string) {
const cachePaths = JSON.parse(core.getState(State.CACHE_PATHS)) as string[];
const cachePathState = core.getState(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) as string[];
core.debug(`paths for caching are ${cachePaths.join(', ')}`);