This commit is contained in:
leavesster 2024-09-26 14:30:35 +08:00 committed by GitHub
commit fbc22b298f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 13 deletions

View File

@ -44,19 +44,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));