1
0
Fork 0
mirror of https://code.forgejo.org/actions/setup-node synced 2025-03-14 22:26:59 +01:00
This commit is contained in:
leavesster 2025-03-14 10:46:45 +08:00 committed by GitHub
commit 2a0e49fc47
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));