MCPcopy Index your code
hub / github.com/actions/setup-node / getCacheDirectories

Function getCacheDirectories

src/cache-utils.ts:209–222  ·  view source on GitHub ↗
(
  packageManagerInfo: PackageManagerInfo,
  cacheDependencyPath: string
)

Source from the content-addressed store, hash-verified

207 * @return list of files on which the cache depends
208 */
209export const getCacheDirectories = async (
210 packageManagerInfo: PackageManagerInfo,
211 cacheDependencyPath: string
212): Promise<string[]> => {
213 // For yarn, if cacheDependencyPath is set, ask information about cache folders in each project
214 // folder satisfied by cacheDependencyPath https://github.com/actions/setup-node/issues/488
215 if (packageManagerInfo.name === 'yarn' && cacheDependencyPath) {
216 return getCacheDirectoriesFromCacheDependencyPath(
217 packageManagerInfo,
218 cacheDependencyPath
219 );
220 }
221 return getCacheDirectoriesForRootProject(packageManagerInfo);
222};
223
224/**
225 * A function to check if the directory is a yarn project configured to manage

Callers 1

restoreCacheFunction · 0.90

Tested by

no test coverage detected