mirror of
https://code.forgejo.org/actions/setup-python
synced 2025-06-08 04:18:19 +02:00
Add warning for empty cache paths (#642)
This commit is contained in:
parent
d1244c8404
commit
7a4f344e33
3 changed files with 23 additions and 2 deletions
7
dist/cache-save/index.js
vendored
7
dist/cache-save/index.js
vendored
|
@ -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('Cache paths are empty. Please check the previous logs and make sure that the python version is specified');
|
||||
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(', ')}`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue