From 09158c28ef840ca6c398a127331f182364d90acc Mon Sep 17 00:00:00 2001 From: yleaf <11785335+leavesster@users.noreply.github.com> Date: Tue, 10 Sep 2024 10:44:45 +0800 Subject: [PATCH] fix: add restore key for all package managers --- src/cache-restore.ts | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/cache-restore.ts b/src/cache-restore.ts index 3b230970..0b40f708 100644 --- a/src/cache-restore.ts +++ b/src/cache-restore.ts @@ -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));