()
| 48 | } |
| 49 | |
| 50 | function 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 | |
| 67 | function resolveVersionInput() { |
| 68 | let versions = core.getMultilineInput('python-version'); |
no test coverage detected