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

Trim trailing space from discovered Python versions. #663

Closed
wants to merge 1 commit into from

Conversation

apg
Copy link

@apg apg commented May 9, 2023

Description:

The setup-python action failed because my .python-version (generated from a recent pyenv) had a trailing newline (not sure if this is a bug in pyenv, but I'll look there next).

Installed versions
  Version 3.11.3
   was not found in the local cache
  Error: The version '3.11.3
  ' with architecture 'x64' was not found for Ubuntu 18.04.
  The list of all available versions can be found here: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json

As you can see, the version was not discovered because the newline didn't match exactly. The way I figure, even if this is user error, stripping trailing space is super easy, and will probably prevent some problems.

Related issue:
Add link to the related issue.

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

The setup-python action failed because my .python-version (generated from a recent pyenv) had a trailing newline (not sure if this is a bug in pyenv, but I'll look there next). 

```
Installed versions
  Version 3.11.3
   was not found in the local cache
  Error: The version '3.11.3
  ' with architecture 'x64' was not found for Ubuntu 18.04.
  The list of all available versions can be found here: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json
```

As you can see, the version was not discovered because the newline didn't match exactly. The way I figure, even if this is user error, stripping trailing space is super easy, and will probably prevent some problems.
@apg apg requested a review from a team as a code owner May 9, 2023 16:46
@kurtmckee
Copy link
Contributor

This appears to be a duplicate of #628. I recommend closure here, and merging of #628.

@dusan-trickovic
Copy link

Closing this PR, as it seems to be a duplicate of #628. Thank you for your contribution!

@dusan-trickovic dusan-trickovic added the duplicate This issue or pull request already exists label Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants