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

Function resolveVersionInput

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

Source from the content-addressed store, hash-verified

65}
66
67function resolveVersionInput() {
68 let versions = core.getMultilineInput('python-version');
69 const versionFile = core.getInput('python-version-file');
70
71 if (versions.length) {
72 if (versionFile) {
73 core.warning(
74 'Both python-version and python-version-file inputs are specified, only python-version will be used.'
75 );
76 }
77 } else {
78 if (versionFile) {
79 if (!fs.existsSync(versionFile)) {
80 throw new Error(
81 `The specified python version file at: ${versionFile} doesn't exist.`
82 );
83 }
84 versions = getVersionInputFromFile(versionFile);
85 } else {
86 versions = resolveVersionInputFromDefaultFile();
87 }
88 }
89
90 return versions;
91}
92
93async function run() {
94 if (IS_MAC) {

Callers 1

runFunction · 0.85

Calls 2

getVersionInputFromFileFunction · 0.90

Tested by

no test coverage detected