11
0
Fork 0
mirror of https://github.com/actions/setup-node.git synced 2026-05-23 21:01:54 +00:00
This commit is contained in:
leavesster 2026-04-23 11:26:48 +08:00 committed by GitHub
commit 2b24f16043
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -46,19 +46,7 @@ export const restoreCache = async (
core.saveState(State.CachePrimaryKey, primaryKey); core.saveState(State.CachePrimaryKey, primaryKey);
const isManagedByYarnBerry = await repoHasYarnBerryManagedDependencies( const cacheKey = await cache.restoreCache(cachePaths, primaryKey, [keyPrefix]);
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);
}
core.setOutput('cache-hit', Boolean(cacheKey)); core.setOutput('cache-hit', Boolean(cacheKey));