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

Function resolveVersionInputFromDefaultFile

src/setup-python.ts:50–65  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

48}
49
50function resolveVersionInputFromDefaultFile(): string[] {
51 const couples: [string, (versionFile: string) => string[]][] = [
52 ['.python-version', getVersionsInputFromPlainFile]
53 ];
54 for (const [versionFile, _fn] of couples) {
55 logWarning(
56 `Neither 'python-version' nor 'python-version-file' inputs were supplied. Attempting to find '${versionFile}' file.`
57 );
58 if (fs.existsSync(versionFile)) {
59 return _fn(versionFile);
60 } else {
61 logWarning(`${versionFile} doesn't exist.`);
62 }
63 }
64 return [];
65}
66
67function resolveVersionInput() {
68 let versions = core.getMultilineInput('python-version');

Callers 1

resolveVersionInputFunction · 0.85

Calls 1

logWarningFunction · 0.90

Tested by

no test coverage detected