Closed
Description
Description:
The action breaks if the .python-version
file specifies multiple Python versions. This is a supported behavior in pyenv
. From pyenv
README.md:
You can also specify multiple versions in a
.python-version
file by hand, separated by newlines.
Action version:
v4.7.0
Platform:
- Ubuntu
- macOS
- Windows
Runner type:
- Hosted
- Self-hosted
Tools version:
All Python versions affected.
Repro steps:
- Add a
.python-version
file in the repository with multiple versions specified, one in each line. - Add the action in one of the project's workflow jobs, without explicitly specifying the Python version so that the action falls back to using
.python-version
file. - Trigger the workflow to run.
Example of failing run:
https://github.com/unconventionaldotdev/unbeheader/actions/runs/6320589478/job/17163309443?pr=14#step:4:10
Expected behavior:
The action should take the Python version from the first line of the .python-version
file.
Actual behavior:
The action takes the entire .python-version
file as the Python version, instead, and fails.