Merge 09158c28ef840ca6c398a127331f182364d90acc into 40337cb8f758cccdfe3475af609daa63f81c7e23

This commit is contained in:
leavesster 2025-03-25 09:32:42 +08:00 committed by GitHub
commit ead9851cff
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);
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));