4
0
Fork 0
mirror of https://github.com/actions/setup-node.git synced 2025-11-07 04:56:55 +00:00

Compare commits

...

2 commits

Author SHA1 Message Date
leavesster
8f979ac70c
Merge 09158c28ef into 2028fbc5c2 2025-10-14 10:47:17 +08:00
yleaf
09158c28ef fix: add restore key for all package managers 2024-09-10 10:44:45 +08:00

View file

@ -46,19 +46,7 @@ export const restoreCache = async (
core.saveState(State.CachePrimaryKey, primaryKey);
const isManagedByYarnBerry = await repoHasYarnBerryManagedDependencies(
packageManagerInfo,
cacheDependencyPath
);
let cacheKey: string | undefined;
if (isManagedByYarnBerry) {
core.info(
'All dependencies are managed locally by yarn3, the previous cache can be used'
);
cacheKey = await cache.restoreCache(cachePaths, primaryKey, [keyPrefix]);
} else {
cacheKey = await cache.restoreCache(cachePaths, primaryKey);
}
const cacheKey = await cache.restoreCache(cachePaths, primaryKey, [keyPrefix]);
core.setOutput('cache-hit', Boolean(cacheKey));