mirror of
https://github.com/actions/setup-python.git
synced 2025-06-28 05:33:47 +00:00
Enhance readability of .python-version
This commit is contained in:
parent
a26af69be9
commit
7c4d5773f1
4 changed files with 82 additions and 24 deletions
|
@ -11,7 +11,7 @@ import {
|
|||
logWarning,
|
||||
IS_MAC,
|
||||
getVersionInputFromFile,
|
||||
getVersionInputFromPlainFile
|
||||
getVersionsInputFromPlainFile
|
||||
} from './utils';
|
||||
|
||||
function isPyPyVersion(versionSpec: string) {
|
||||
|
@ -35,7 +35,7 @@ async function cacheDependencies(cache: string, pythonVersion: string) {
|
|||
|
||||
function resolveVersionInputFromDefaultFile(): string[] {
|
||||
const couples: [string, (versionFile: string) => string[]][] = [
|
||||
['.python-version', getVersionInputFromPlainFile]
|
||||
['.python-version', getVersionsInputFromPlainFile]
|
||||
];
|
||||
for (const [versionFile, _fn] of couples) {
|
||||
logWarning(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue