Skip to content

action always prefers the default '.python-version' supplied version if it exists #1086

Closed
@rjdbcm

Description

@rjdbcm

Description:

According to the README

The python-version input is optional. If not supplied, the action will try to resolve the version from the default .python-version file. If the .python-version file doesn't exist Python or PyPy version from the PATH will be used.

however, if a repo has a .python-version file, the version in that file will always be used instead of that supplied in the action argument python-version.

Action version:
v5

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:
applies to all valid versions

Repro steps:

In an actions workflow:

  1. checkout a repo with a valid .python-version file
  2. run setup-python with a valid python-version argument

Expected behavior:
I expected setup-python to prefer the python-version argument when it is available.

Actual behavior:
setup-python uses the version contained in .python-version instead of the one supplied in the argument.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions