Skip to content

Sudo password required on macOS self-hosted runner #1238

@kajoshi0117

Description

@kajoshi0117

Description:
setup-python fails on macOS self-hosted runner due to unconditional sudo in setup.sh
requiring password (cannot dynamically install Python)
Action version:
v5 and v6
Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:

Repro steps:
Just specifying and using the action in a github action workflow on a macOS self-hosted runner. This would happen when specifying an input to the action python-verison: ${PYTHON_VERSION}. I made sure to follow all the steps here to ensure the self-hosted runner had no issues with updating and writing to the /Users/runner/hostedtoolcache directory: https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#macos
Expected behavior:
Specified version of Python gets installed easily with no issue
Actual behavior:
An error occurs specifying a sudo command and a password is required.
setup-python-error.log

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions