1
0
Fork 0
mirror of https://code.forgejo.org/actions/setup-python synced 2025-06-09 04:42:20 +02:00

Add warning for empty cache paths (#642)

This commit is contained in:
Dmitry Shibanov 2023-04-06 12:02:34 +02:00 committed by GitHub
parent d1244c8404
commit 7a4f344e33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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(
'Cache paths are empty. Please check the previous logs and make sure that the python version is specified'
);
return;
}
const cachePaths = JSON.parse(cachePathState) as string[];
core.debug(`paths for caching are ${cachePaths.join(', ')}`);