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

Function getVersionInputFromFile

src/utils.ts:392–402  ·  view source on GitHub ↗
(versionFile: string)

Source from the content-addressed store, hash-verified

390 * Python version extracted from a plain, .tool-versions, Pipfile or TOML file.
391 */
392export function getVersionInputFromFile(versionFile: string): string[] {
393 if (versionFile.endsWith('.toml')) {
394 return getVersionInputFromTomlFile(versionFile);
395 } else if (versionFile.match('.tool-versions')) {
396 return getVersionInputFromToolVersions(versionFile);
397 } else if (versionFile.match('Pipfile')) {
398 return getVersionInputFromPipfileFile(versionFile);
399 } else {
400 return getVersionsInputFromPlainFile(versionFile);
401 }
402}
403
404/**
405 * Get the directory containing interpreter binary from installation directory of PyPy

Callers 1

resolveVersionInputFunction · 0.90

Tested by

no test coverage detected