Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Action breaks when .python-version file specifies multiple versions #734

Open
2 of 5 tasks
OmeGak opened this issue Sep 27, 2023 · 2 comments · May be fixed by #787
Open
2 of 5 tasks

Action breaks when .python-version file specifies multiple versions #734

OmeGak opened this issue Sep 27, 2023 · 2 comments · May be fixed by #787
Labels
bug Something isn't working

Comments

@OmeGak
Copy link

OmeGak commented Sep 27, 2023

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:

  1. Add a .python-version file in the repository with multiple versions specified, one in each line.
  2. 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.
  3. 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.

@OmeGak OmeGak added bug Something isn't working needs triage labels Sep 27, 2023
@dmitry-shibanov
Copy link
Contributor

Hello @OmeGak. Thank you for your report. We'll take a look at the issue.

@krystof-k
Copy link

Similar issue is when using pyenv-virtualenv auto-activation like

3.10.13/envs/virtualenv

Unfortunately, Pyenv doesn't feel like to fix the issue (pyenv/pyenv-virtualenv#472).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants