-
Notifications
You must be signed in to change notification settings - Fork 586
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
Unable to use asdf-vm based version-file #571
Labels
enhancement
New feature or request
Comments
Hello @hjpotter92 ! Thank you for reporting this! |
elpic
added a commit
to elpic/setup-python
that referenced
this issue
Jan 17, 2023
Create a function to parse tool-version (asdf-vm) format, add the associated tests, and updated the documentation Ticket-ID: actions#571
2 tasks
elpic
added a commit
to elpic/setup-python
that referenced
this issue
Mar 14, 2023
Create a function to parse tool-version (asdf-vm) format, add the associated tests, and updated the documentation Ticket-ID: actions#571
elpic
added a commit
to elpic/setup-python
that referenced
this issue
May 31, 2023
Create a function to parse tool-version (asdf-vm) format, add the associated tests, and updated the documentation Ticket-ID: actions#571
2 tasks
As a workaround you can add a small intermediate step: - name: Determine versions
shell: bash -leo pipefail {0}
id: get_versions
run: |
python="$(grep -v '#' .tool-versions | grep python | awk '{print $2}')"
echo "python=${python}" >> $GITHUB_OUTPUT
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: ${{ steps.get_versions.outputs.python }} |
You can even parse the Python version in a single step: python_version="$(grep --perl-regexp --only-matching '(?<=python )(\d+\.){2}\d+' .tool-versions)" |
5 tasks
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was using
setup-node
action, and didn't face this problem when using.tool-versions
file; so i was surprised hitting this error insetup-python
action.Description:
When using the action, I expected it to work seamlessly with
.tool-versions
file that asdf-vm generates.Action version:
Using
@v4
Platform:
Runner type:
Tools version:
Repro steps:
Create a asdf based version file:
Use the generated
.tool-versions
file in github action:Fails to install python.
Expected behavior:
Parser should be smart to also identify other version managers
Actual behavior:
The text was updated successfully, but these errors were encountered: