MCPcopy Index your code
hub / github.com/actions/setup-python / getCacheDistributor

Function getCacheDistributor

src/cache-distributions/cache-factory.ts:11–26  ·  view source on GitHub ↗
(
  packageManager: string,
  pythonVersion: string,
  cacheDependencyPath: string | undefined
)

Source from the content-addressed store, hash-verified

9}
10
11export function getCacheDistributor(
12 packageManager: string,
13 pythonVersion: string,
14 cacheDependencyPath: string | undefined
15) {
16 switch (packageManager) {
17 case PackageManagers.Pip:
18 return new PipCache(pythonVersion, cacheDependencyPath);
19 case PackageManagers.Pipenv:
20 return new PipenvCache(pythonVersion, cacheDependencyPath);
21 case PackageManagers.Poetry:
22 return new PoetryCache(pythonVersion, cacheDependencyPath);
23 default:
24 throw new Error(`Caching for '${packageManager}' is not supported`);
25 }
26}

Callers 2

cacheDependenciesFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected