mirror of https://github.com/actions/setup-node
Compare commits
2 Commits
ae41b04d17
...
fbc22b298f
Author | SHA1 | Date |
---|---|---|
leavesster | fbc22b298f | |
yleaf | 09158c28ef |
|
@ -44,19 +44,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));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue