mirror of
https://github.com/actions/setup-python.git
synced 2025-07-03 16:13:47 +00:00
Remove PromiseReturnType, add matchedKey == primaryKey check
This commit is contained in:
parent
fa50ad5388
commit
08415fd28f
4 changed files with 9 additions and 24 deletions
7
dist/cache-save/index.js
vendored
7
dist/cache-save/index.js
vendored
|
@ -37234,18 +37234,17 @@ class CacheDistributor {
|
|||
core.saveState(State.CACHE_PATHS, cachePath);
|
||||
core.saveState(State.STATE_CACHE_PRIMARY_KEY, primaryKey);
|
||||
const matchedKey = yield cache.restoreCache(cachePath, primaryKey, restoreKey);
|
||||
this.handleMatchResult(matchedKey);
|
||||
this.handleMatchResult(matchedKey, primaryKey);
|
||||
});
|
||||
}
|
||||
handleMatchResult(matchedKey) {
|
||||
if (matchedKey) {
|
||||
handleMatchResult(matchedKey, primaryKey) {
|
||||
if (matchedKey == primaryKey) {
|
||||
core.saveState(State.CACHE_MATCHED_KEY, matchedKey);
|
||||
core.info(`Cache restored from key: ${matchedKey}`);
|
||||
}
|
||||
else {
|
||||
core.info(`${this.packageManager} cache is not found`);
|
||||
}
|
||||
core.info('cache was hit');
|
||||
core.setOutput('cache-hit', Boolean(matchedKey));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue